Package com.aspectran.core.context
Interface ActivityContext
-
- All Known Implementing Classes:
DefaultActivityContext
public interface ActivityContextCentral interface to provide configuration for performing various activities.Created: 2008. 06. 09 PM 2:12:40
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_ENCODINGstatic java.lang.StringID_SEPARATORstatic charID_SEPARATOR_CHARstatic java.lang.StringMESSAGE_SOURCE_BEAN_IDstatic charNAME_SEPARATOR_CHAR
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ApplicationAdaptergetApplicationAdapter()Returns the class loader used by the current application.AspectRuleRegistrygetAspectRuleRegistry()Gets the aspect rule registry.ActivitygetAvailableActivity()Gets the available activity.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 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()Returns whether there is current activity.voidremoveCurrentActivity()Removes the current activity.voidsetCurrentActivity(Activity activity)Sets the current activity.voidsetRootService(CoreService rootService)Sets the Aspectran Service that created the current ActivityContext.
-
-
-
Field Detail
-
ID_SEPARATOR
static final java.lang.String ID_SEPARATOR
- See Also:
- Constant Field Values
-
ID_SEPARATOR_CHAR
static final char ID_SEPARATOR_CHAR
- See Also:
- Constant Field Values
-
NAME_SEPARATOR_CHAR
static final char NAME_SEPARATOR_CHAR
- See Also:
- Constant Field Values
-
DEFAULT_ENCODING
static final java.lang.String DEFAULT_ENCODING
-
MESSAGE_SOURCE_BEAN_ID
static final java.lang.String MESSAGE_SOURCE_BEAN_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDescription
java.lang.String getDescription()
Gets the description of this ActivityContext.- Returns:
- the description of this ActivityContext
-
getRootService
CoreService getRootService()
Returns the Aspectran Service that created the current ActivityContext.- Returns:
- the root service
-
setRootService
void setRootService(CoreService rootService)
Sets the Aspectran Service that created the current ActivityContext. It is set only once, just after the ActivityContext is created.- Parameters:
rootService- the root service
-
getApplicationAdapter
ApplicationAdapter getApplicationAdapter()
Returns the class loader used by the current application.- Returns:
- the class loader
-
getEnvironment
Environment getEnvironment()
Gets the environment.- Returns:
- the environment
-
getAspectRuleRegistry
AspectRuleRegistry getAspectRuleRegistry()
Gets the aspect rule registry.- Returns:
- the aspect rule registry
-
getBeanRegistry
BeanRegistry getBeanRegistry()
Gets the bean registry.- Returns:
- the bean registry
-
getScheduleRuleRegistry
ScheduleRuleRegistry getScheduleRuleRegistry()
Gets the schedule rule registry.- Returns:
- the schedule rule registry
-
getTemplateRenderer
TemplateRenderer getTemplateRenderer()
Gets the template renderer.- Returns:
- the template renderer
-
getTransletRuleRegistry
TransletRuleRegistry getTransletRuleRegistry()
Gets the translet rule registry.- Returns:
- the translet rule registry
-
getMessageSource
MessageSource getMessageSource()
Gets the message source.- Returns:
- the message source
-
getDefaultActivity
Activity getDefaultActivity()
Gets the default activity.- Returns:
- the default activity
-
getAvailableActivity
Activity getAvailableActivity()
Gets the available activity. If there is no current activity, the application default activity is returned.- Returns:
- the available activity
-
getCurrentActivity
Activity getCurrentActivity()
Gets the current activity.- Returns:
- the current activity
- Throws:
InactivityStateException- if there is no current activity
-
setCurrentActivity
void setCurrentActivity(Activity activity)
Sets the current activity.- Parameters:
activity- the new current activity
-
removeCurrentActivity
void removeCurrentActivity()
Removes the current activity.
-
hasCurrentActivity
boolean hasCurrentActivity()
Returns whether there is current activity.- Returns:
trueif there is current activity,falseotherwise
-
-