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 voiddoDestroy()protected voiddoInitialize()ApplicationAdaptergetApplicationAdapter()Returns the class loader used by the current application.AspectRuleRegistrygetAspectRuleRegistry()Gets the aspect rule registry.BeanRegistrygetBeanRegistry()Gets the bean registry.ActivitygetCurrentActivity()Gets the current activity.ActivitygetDefaultActivity()Gets the default activity.java.lang.StringgetDescription()Gets the description of this ActivityContext.EnvironmentgetEnvironment()Gets the context environment.MessageSourcegetMessageSource()Gets the message source.CoreServicegetRootService()Returns the Aspectran Service that created the current ActivityContext.ScheduleRuleRegistrygetScheduleRuleRegistry()Gets the schedule rule registry.TemplateRenderergetTemplateRenderer()Gets the template renderer.TransletRuleRegistrygetTransletRuleRegistry()Gets the translet rule registry.booleanhasCurrentActivity()voidremoveCurrentActivity()Removes the current activity.voidsetAspectRuleRegistry(AspectRuleRegistry aspectRuleRegistry)voidsetContextualBeanRegistry(ContextualBeanRegistry contextualBeanRegistry)Sets the context bean registry.voidsetContextualTemplateRenderer(ContextualTemplateRenderer contextualTemplateRenderer)Sets the template processor.voidsetCurrentActivity(Activity activity)Sets the current activity.voidsetDescription(java.lang.String description)voidsetRootService(CoreService rootService)Sets the Aspectran Service that created the current ActivityContext.voidsetScheduleRuleRegistry(ScheduleRuleRegistry scheduleRuleRegistry)voidsetTransletRuleRegistry(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:ActivityContextReturns the class loader used by the current application.- Specified by:
getApplicationAdapterin interfaceActivityContext- Returns:
- the class loader
-
getEnvironment
public Environment getEnvironment()
Description copied from interface:ActivityContextGets the context environment.- Specified by:
getEnvironmentin interfaceActivityContext- Returns:
- the context environment
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ActivityContextGets the description of this ActivityContext.- Specified by:
getDescriptionin interfaceActivityContext- Returns:
- the description of this ActivityContext
-
setDescription
public void setDescription(java.lang.String description)
-
getRootService
public CoreService getRootService()
Description copied from interface:ActivityContextReturns the Aspectran Service that created the current ActivityContext.- Specified by:
getRootServicein interfaceActivityContext- Returns:
- the root service
-
setRootService
public void setRootService(CoreService rootService)
Description copied from interface:ActivityContextSets the Aspectran Service that created the current ActivityContext. It is set only once, just after the ActivityContext is created.- Specified by:
setRootServicein interfaceActivityContext- Parameters:
rootService- the root service
-
getAspectRuleRegistry
public AspectRuleRegistry getAspectRuleRegistry()
Description copied from interface:ActivityContextGets the aspect rule registry.- Specified by:
getAspectRuleRegistryin interfaceActivityContext- Returns:
- the aspect rule registry
-
setAspectRuleRegistry
public void setAspectRuleRegistry(AspectRuleRegistry aspectRuleRegistry)
-
getBeanRegistry
public BeanRegistry getBeanRegistry()
Description copied from interface:ActivityContextGets the bean registry.- Specified by:
getBeanRegistryin 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:ActivityContextGets the template renderer.- Specified by:
getTemplateRendererin 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:ActivityContextGets the schedule rule registry.- Specified by:
getScheduleRuleRegistryin interfaceActivityContext- Returns:
- the schedule rule registry
-
setScheduleRuleRegistry
public void setScheduleRuleRegistry(ScheduleRuleRegistry scheduleRuleRegistry)
-
getTransletRuleRegistry
public TransletRuleRegistry getTransletRuleRegistry()
Description copied from interface:ActivityContextGets the translet rule registry.- Specified by:
getTransletRuleRegistryin 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:ActivityContextGets the message source.- Specified by:
getMessageSourcein interfaceActivityContext- Returns:
- the message source
-
getDefaultActivity
public Activity getDefaultActivity()
Description copied from interface:ActivityContextGets the default activity.- Specified by:
getDefaultActivityin interfaceActivityContext- Returns:
- the default activity
-
getCurrentActivity
public Activity getCurrentActivity()
Description copied from interface:ActivityContextGets the current activity.- Specified by:
getCurrentActivityin interfaceActivityContext- Returns:
- the current activity
-
setCurrentActivity
public void setCurrentActivity(Activity activity)
Description copied from interface:ActivityContextSets the current activity.- Specified by:
setCurrentActivityin interfaceActivityContext- Parameters:
activity- the new current activity
-
removeCurrentActivity
public void removeCurrentActivity()
Description copied from interface:ActivityContextRemoves the current activity.- Specified by:
removeCurrentActivityin interfaceActivityContext
-
hasCurrentActivity
public boolean hasCurrentActivity()
- Specified by:
hasCurrentActivityin interfaceActivityContext
-
doInitialize
protected void doInitialize() throws java.lang.Exception- Specified by:
doInitializein classAbstractComponent- Throws:
java.lang.Exception
-
doDestroy
protected void doDestroy()
- Specified by:
doDestroyin classAbstractComponent
-
-