Package com.aspectran.core.context
Class DefaultActivityContext
- java.lang.Object
-
- com.aspectran.core.component.AbstractComponent
-
- com.aspectran.core.context.DefaultActivityContext
-
- All Implemented Interfaces:
Component
,ActivityContext
public class DefaultActivityContext extends AbstractComponent implements ActivityContext
The Class DefaultActivityContext.Created: 2008. 06. 09 PM 2:12:40
-
-
Field Summary
-
Fields inherited from interface com.aspectran.core.context.ActivityContext
DEFAULT_ENCODING, ID_SEPARATOR, ID_SEPARATOR_CHAR, MESSAGE_SOURCE_BEAN_ID, NAME_SEPARATOR_CHAR
-
-
Constructor Summary
Constructors Constructor Description DefaultActivityContext(ApplicationAdapter applicationAdapter)
Instantiates a new DefaultActivityContext.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doDestroy()
protected void
doInitialize()
ApplicationAdapter
getApplicationAdapter()
Returns the class loader used by the current application.AspectRuleRegistry
getAspectRuleRegistry()
Gets the aspect rule registry.Activity
getAvailableActivity()
Gets the available activity.BeanRegistry
getBeanRegistry()
Gets the bean registry.Activity
getCurrentActivity()
Gets the current activity.Activity
getDefaultActivity()
Gets the default activity.java.lang.String
getDescription()
Gets the description of this ActivityContext.DescriptionRule
getDescriptionRule()
Environment
getEnvironment()
Gets the environment.MessageSource
getMessageSource()
Gets the message source.CoreService
getRootService()
Returns the Aspectran Service that created the current ActivityContext.ScheduleRuleRegistry
getScheduleRuleRegistry()
Gets the schedule rule registry.TemplateRenderer
getTemplateRenderer()
Gets the template renderer.TransletRuleRegistry
getTransletRuleRegistry()
Gets the translet rule registry.boolean
hasCurrentActivity()
Returns whether there is current activity.void
removeCurrentActivity()
Removes the current activity.void
setActivityEnvironment(ActivityEnvironment activityEnvironment)
void
setAspectRuleRegistry(AspectRuleRegistry aspectRuleRegistry)
void
setCurrentActivity(Activity activity)
Sets the current activity.void
setDefaultBeanRegistry(DefaultBeanRegistry defaultBeanRegistry)
Sets the default bean registry.void
setDefaultTemplateRenderer(DefaultTemplateRenderer defaultTemplateRenderer)
Sets the template processor.void
setDescriptionRule(DescriptionRule descriptionRule)
void
setRootService(CoreService rootService)
Sets the Aspectran Service that created the current ActivityContext.void
setScheduleRuleRegistry(ScheduleRuleRegistry scheduleRuleRegistry)
void
setTransletRuleRegistry(TransletRuleRegistry transletRuleRegistry)
Sets the translet rule registry.-
Methods inherited from class com.aspectran.core.component.AbstractComponent
destroy, getComponentName, initialize, isAvailable, isDestroyed, isDestroying, isInitialized
-
-
-
-
Constructor Detail
-
DefaultActivityContext
public DefaultActivityContext(ApplicationAdapter applicationAdapter)
Instantiates a new DefaultActivityContext.- Parameters:
applicationAdapter
- the application adapter
-
-
Method Detail
-
getDescriptionRule
public DescriptionRule getDescriptionRule()
-
setDescriptionRule
public void setDescriptionRule(DescriptionRule descriptionRule)
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ActivityContext
Gets the description of this ActivityContext.- Specified by:
getDescription
in interfaceActivityContext
- Returns:
- the description of this ActivityContext
-
getRootService
public CoreService getRootService()
Description copied from interface:ActivityContext
Returns the Aspectran Service that created the current ActivityContext.- Specified by:
getRootService
in interfaceActivityContext
- Returns:
- the root service
-
setRootService
public void setRootService(CoreService rootService)
Description copied from interface:ActivityContext
Sets the Aspectran Service that created the current ActivityContext. It is set only once, just after the ActivityContext is created.- Specified by:
setRootService
in interfaceActivityContext
- Parameters:
rootService
- the root service
-
getApplicationAdapter
public ApplicationAdapter getApplicationAdapter()
Description copied from interface:ActivityContext
Returns the class loader used by the current application.- Specified by:
getApplicationAdapter
in interfaceActivityContext
- Returns:
- the class loader
-
getEnvironment
public Environment getEnvironment()
Description copied from interface:ActivityContext
Gets the environment.- Specified by:
getEnvironment
in interfaceActivityContext
- Returns:
- the environment
-
setActivityEnvironment
public void setActivityEnvironment(ActivityEnvironment activityEnvironment)
-
getAspectRuleRegistry
public AspectRuleRegistry getAspectRuleRegistry()
Description copied from interface:ActivityContext
Gets the aspect rule registry.- Specified by:
getAspectRuleRegistry
in interfaceActivityContext
- Returns:
- the aspect rule registry
-
setAspectRuleRegistry
public void setAspectRuleRegistry(AspectRuleRegistry aspectRuleRegistry)
-
getBeanRegistry
public BeanRegistry getBeanRegistry()
Description copied from interface:ActivityContext
Gets the bean registry.- Specified by:
getBeanRegistry
in interfaceActivityContext
- Returns:
- the bean registry
-
setDefaultBeanRegistry
public void setDefaultBeanRegistry(DefaultBeanRegistry defaultBeanRegistry)
Sets the default bean registry.- Parameters:
defaultBeanRegistry
- the new default bean registry
-
getTemplateRenderer
public TemplateRenderer getTemplateRenderer()
Description copied from interface:ActivityContext
Gets the template renderer.- Specified by:
getTemplateRenderer
in interfaceActivityContext
- Returns:
- the template renderer
-
setDefaultTemplateRenderer
public void setDefaultTemplateRenderer(DefaultTemplateRenderer defaultTemplateRenderer)
Sets the template processor.- Parameters:
defaultTemplateRenderer
- the new template processor
-
getScheduleRuleRegistry
public ScheduleRuleRegistry getScheduleRuleRegistry()
Description copied from interface:ActivityContext
Gets the schedule rule registry.- Specified by:
getScheduleRuleRegistry
in interfaceActivityContext
- Returns:
- the schedule rule registry
-
setScheduleRuleRegistry
public void setScheduleRuleRegistry(ScheduleRuleRegistry scheduleRuleRegistry)
-
getTransletRuleRegistry
public TransletRuleRegistry getTransletRuleRegistry()
Description copied from interface:ActivityContext
Gets the translet rule registry.- Specified by:
getTransletRuleRegistry
in interfaceActivityContext
- Returns:
- the translet rule registry
-
setTransletRuleRegistry
public void setTransletRuleRegistry(TransletRuleRegistry transletRuleRegistry)
Sets the translet rule registry.- Parameters:
transletRuleRegistry
- the new translet rule registry
-
getMessageSource
public MessageSource getMessageSource()
Description copied from interface:ActivityContext
Gets the message source.- Specified by:
getMessageSource
in interfaceActivityContext
- Returns:
- the message source
-
getDefaultActivity
public Activity getDefaultActivity()
Description copied from interface:ActivityContext
Gets the default activity.- Specified by:
getDefaultActivity
in interfaceActivityContext
- Returns:
- the default activity
-
getAvailableActivity
public Activity getAvailableActivity()
Description copied from interface:ActivityContext
Gets the available activity. If there is no current activity, the application default activity is returned.- Specified by:
getAvailableActivity
in interfaceActivityContext
- Returns:
- the available activity
-
getCurrentActivity
public Activity getCurrentActivity()
Description copied from interface:ActivityContext
Gets the current activity.- Specified by:
getCurrentActivity
in interfaceActivityContext
- Returns:
- the current activity
-
setCurrentActivity
public void setCurrentActivity(Activity activity)
Description copied from interface:ActivityContext
Sets the current activity.- Specified by:
setCurrentActivity
in interfaceActivityContext
- Parameters:
activity
- the new current activity
-
removeCurrentActivity
public void removeCurrentActivity()
Description copied from interface:ActivityContext
Removes the current activity.- Specified by:
removeCurrentActivity
in interfaceActivityContext
-
hasCurrentActivity
public boolean hasCurrentActivity()
Description copied from interface:ActivityContext
Returns whether there is current activity.- Specified by:
hasCurrentActivity
in interfaceActivityContext
- Returns:
true
if there is current activity,false
otherwise
-
doInitialize
protected void doInitialize() throws java.lang.Exception
- Specified by:
doInitialize
in classAbstractComponent
- Throws:
java.lang.Exception
-
doDestroy
protected void doDestroy()
- Specified by:
doDestroy
in classAbstractComponent
-
-