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
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, NAME_SEPARATOR_CHAR
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultActivityContext
(ClassLoader classLoader, ApplicationAdapter applicationAdapter) Instantiates a new DefaultActivityContext. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
Returns the class loader used by the current application.Gets the aspect rule registry.Gets the available activity.Gets the bean registry.Returns the ClassLoader for this service.Gets the current activity.Gets the default activity.Returns the description of this ActivityContext ornull
if this ActivityContext has no description.Gets the environment.Gets the message source.getName()
Returns the name of this ActivityContext ornull
if this ActivityContext is not named.Returns the first created CoreService that holds the ActivityContext.Gets the schedule rule registry.Gets the template renderer.Gets the translet rule registry.boolean
Returns whether there is current activity.void
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
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 Details
-
DefaultActivityContext
Instantiates a new DefaultActivityContext.- Parameters:
classLoader
- the class loaderapplicationAdapter
- the application adapter
-
-
Method Details
-
getName
Description copied from interface:ActivityContext
Returns the name of this ActivityContext ornull
if this ActivityContext is not named.- Specified by:
getName
in interfaceActivityContext
- Returns:
- name of this ActivityContext; or
null
if this ActivityContext is not named.
-
setName
-
getDescriptionRule
-
setDescriptionRule
-
getDescription
Description copied from interface:ActivityContext
Returns the description of this ActivityContext ornull
if this ActivityContext has no description.- Specified by:
getDescription
in interfaceActivityContext
- Returns:
- description of this ActivityContext or
null
if this ActivityContext has no description.
-
getRootService
Description copied from interface:ActivityContext
Returns the first created CoreService that holds the ActivityContext.- Specified by:
getRootService
in interfaceActivityContext
- Returns:
- the root service
-
setRootService
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
-
getClassLoader
Description copied from interface:ActivityContext
Returns the ClassLoader for this service.- Specified by:
getClassLoader
in interfaceActivityContext
- Returns:
- the ClassLoader for this service
-
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
Description copied from interface:ActivityContext
Gets the environment.- Specified by:
getEnvironment
in interfaceActivityContext
- Returns:
- the environment
-
setActivityEnvironment
-
getAspectRuleRegistry
Description copied from interface:ActivityContext
Gets the aspect rule registry.- Specified by:
getAspectRuleRegistry
in interfaceActivityContext
- Returns:
- the aspect rule registry
-
setAspectRuleRegistry
-
getBeanRegistry
Description copied from interface:ActivityContext
Gets the bean registry.- Specified by:
getBeanRegistry
in interfaceActivityContext
- Returns:
- the bean registry
-
setDefaultBeanRegistry
Sets the default bean registry.- Parameters:
defaultBeanRegistry
- the new default bean registry
-
getTemplateRenderer
Description copied from interface:ActivityContext
Gets the template renderer.- Specified by:
getTemplateRenderer
in interfaceActivityContext
- Returns:
- the template renderer
-
setDefaultTemplateRenderer
Sets the template processor.- Parameters:
defaultTemplateRenderer
- the new template processor
-
getScheduleRuleRegistry
Description copied from interface:ActivityContext
Gets the schedule rule registry.- Specified by:
getScheduleRuleRegistry
in interfaceActivityContext
- Returns:
- the schedule rule registry
-
setScheduleRuleRegistry
-
getTransletRuleRegistry
Description copied from interface:ActivityContext
Gets the translet rule registry.- Specified by:
getTransletRuleRegistry
in interfaceActivityContext
- Returns:
- the translet rule registry
-
setTransletRuleRegistry
Sets the translet rule registry.- Parameters:
transletRuleRegistry
- the new translet rule registry
-
getMessageSource
Description copied from interface:ActivityContext
Gets the message source.- Specified by:
getMessageSource
in interfaceActivityContext
- Returns:
- the message source
-
getDefaultActivity
Description copied from interface:ActivityContext
Gets the default activity.- Specified by:
getDefaultActivity
in interfaceActivityContext
- Returns:
- the default 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
Description copied from interface:ActivityContext
Gets the current activity.- Specified by:
getCurrentActivity
in interfaceActivityContext
- Returns:
- the current activity
-
setCurrentActivity
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
- Specified by:
doInitialize
in classAbstractComponent
- Throws:
Exception
-
doDestroy
protected void doDestroy()- Specified by:
doDestroy
in classAbstractComponent
-