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, CoreService masterService) 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.Returns the first created CoreService that holds the ActivityContext.Gets the message source.getName()
Returns the name of this ActivityContext ornull
if this ActivityContext is not named.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
setAspectRuleRegistry
(AspectRuleRegistry aspectRuleRegistry) void
setBeanRegistry
(DefaultBeanRegistry beanRegistry) Sets the default bean registry.void
setCurrentActivity
(Activity activity) Sets the current activity.void
setDescriptionRule
(DescriptionRule descriptionRule) void
setEnvironment
(ActivityEnvironment activityEnvironment) void
void
setScheduleRuleRegistry
(ScheduleRuleRegistry scheduleRuleRegistry) void
setTemplateRenderer
(DefaultTemplateRenderer templateRenderer) Sets the template processor.void
setTransletRuleRegistry
(TransletRuleRegistry transletRuleRegistry) Sets the translet rule registry.Methods inherited from class com.aspectran.core.component.AbstractComponent
checkAvailable, checkInitializable, checkNotDestroyed, destroy, getComponentName, initialize, isAvailable, isDestroyed, isDestroying, isInitializable, isInitialized, isInitializing
-
Constructor Details
-
DefaultActivityContext
public DefaultActivityContext(ClassLoader classLoader, ApplicationAdapter applicationAdapter, CoreService masterService) 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.
-
getMasterService
Description copied from interface:ActivityContext
Returns the first created CoreService that holds the ActivityContext.- Specified by:
getMasterService
in interfaceActivityContext
- Returns:
- the master 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
-
setEnvironment
-
getBeanRegistry
Description copied from interface:ActivityContext
Gets the bean registry.- Specified by:
getBeanRegistry
in interfaceActivityContext
- Returns:
- the bean registry
-
setBeanRegistry
Sets the default bean registry.- Parameters:
beanRegistry
- the new default bean registry
-
getTemplateRenderer
Description copied from interface:ActivityContext
Gets the template renderer.- Specified by:
getTemplateRenderer
in interfaceActivityContext
- Returns:
- the template renderer
-
setTemplateRenderer
Sets the template processor.- Parameters:
templateRenderer
- the new template processor
-
getAspectRuleRegistry
Description copied from interface:ActivityContext
Gets the aspect rule registry.- Specified by:
getAspectRuleRegistry
in interfaceActivityContext
- Returns:
- the aspect rule registry
-
setAspectRuleRegistry
-
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
-
getActivityCounter
- Specified by:
getActivityCounter
in interfaceActivityContext
-
doInitialize
- Specified by:
doInitialize
in classAbstractComponent
- Throws:
Exception
-
doDestroy
protected void doDestroy()- Specified by:
doDestroy
in classAbstractComponent
-