Package com.aspectran.core.context
Class AspectranActivityContext
- java.lang.Object
-
- com.aspectran.core.component.AbstractComponent
-
- com.aspectran.core.context.AspectranActivityContext
-
- All Implemented Interfaces:
Component
,ActivityContext
public class AspectranActivityContext extends AbstractComponent implements ActivityContext
The Class AspectranActivityContext.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 AspectranActivityContext(ApplicationAdapter applicationAdapter, ContextEnvironment contextEnvironment)
Instantiates a new AspectranActivityContext.
-
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.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.Environment
getEnvironment()
Gets the context 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.void
removeCurrentActivity()
Removes the current activity.void
setAspectRuleRegistry(AspectRuleRegistry aspectRuleRegistry)
void
setContextualBeanRegistry(ContextualBeanRegistry contextualBeanRegistry)
Sets the context bean registry.void
setContextualTemplateRenderer(ContextualTemplateRenderer contextualTemplateRenderer)
Sets the template processor.void
setCurrentActivity(Activity activity)
Sets the current activity.void
setDescription(java.lang.String description)
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
-
AspectranActivityContext
public AspectranActivityContext(ApplicationAdapter applicationAdapter, ContextEnvironment contextEnvironment)
Instantiates a new AspectranActivityContext.- Parameters:
applicationAdapter
- the application adaptercontextEnvironment
- the context environment
-
-
Method Detail
-
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 context environment.- Specified by:
getEnvironment
in interfaceActivityContext
- Returns:
- the context environment
-
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
-
setDescription
public void setDescription(java.lang.String description)
-
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
-
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
-
setContextualBeanRegistry
public void setContextualBeanRegistry(ContextualBeanRegistry contextualBeanRegistry)
Sets the context bean registry.- Parameters:
contextualBeanRegistry
- the new context bean registry
-
getTemplateRenderer
public TemplateRenderer getTemplateRenderer()
Description copied from interface:ActivityContext
Gets the template renderer.- Specified by:
getTemplateRenderer
in interfaceActivityContext
- Returns:
- the template renderer
-
setContextualTemplateRenderer
public void setContextualTemplateRenderer(ContextualTemplateRenderer contextualTemplateRenderer)
Sets the template processor.- Parameters:
contextualTemplateRenderer
- 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
-
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
-
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
-
-