Activity, BeanRegistryBasicActivitypublic abstract class AbstractActivity extends java.lang.Object implements Activity
Created: 2008. 03. 22 PM 5:48:09
| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractActivity(ActivityContext context) |
Instantiates a new abstract activity.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
backupCurrentActivity() |
Backups the current activity.
|
boolean |
containsBean(java.lang.Class<?> requiredType) |
Return whether a bean with the specified object type is present.
|
boolean |
containsBean(java.lang.String id) |
Return whether a bean with the specified id is present.
|
ActivityContext |
getActivityContext() |
Gets the activity context.
|
<T> T |
getAfterAdviceResult(java.lang.String aspectId) |
Gets the after advice result.
|
protected java.util.List<AspectAdviceRule> |
getAfterAdviceRuleList() |
|
ApplicationAdapter |
getApplicationAdapter() |
Gets the application adapter.
|
<T> T |
getAroundAdviceResult(java.lang.String aspectId) |
Gets the around advice result.
|
<T> T |
getAspectAdviceBean(java.lang.String aspectId) |
Gets the aspect advice bean.
|
protected AspectRuleRegistry |
getAspectRuleRegistry() |
Gets the aspect rule registry.
|
<T> T |
getBean(java.lang.Class<T> requiredType) |
Return an instance of the bean that matches the given object type.
|
<T> T |
getBean(java.lang.Class<T> requiredType,
java.lang.String id) |
Return an instance of the bean that matches the given object type.
|
<T> T |
getBean(java.lang.String id) |
Return an instance of the bean that matches the given id.
|
<T> T |
getBean(java.lang.String id,
java.lang.Class<T> requiredType) |
Return an instance of the bean that matches the given id.
|
BeanRegistry |
getBeanRegistry() |
Gets the bean registry.
|
<T> T |
getBeforeAdviceResult(java.lang.String aspectId) |
Gets the before advice result.
|
protected java.util.List<AspectAdviceRule> |
getBeforeAdviceRuleList() |
|
<T> T |
getConfigBean(java.lang.Class<T> classType) |
Return the bean instance that matches the specified object type.
|
protected Activity |
getCurrentActivity() |
Gets the current activity.
|
Environment |
getEnvironment() |
Returns the environment of the current activity context.
|
protected java.util.List<ExceptionRule> |
getExceptionRuleList() |
|
<T> T |
getFinallyAdviceResult(java.lang.String aspectId) |
Gets the finally advice result.
|
protected java.util.List<AspectAdviceRule> |
getFinallyAdviceRuleList() |
|
java.lang.Throwable |
getRaisedException() |
Returns an instance of the currently raised exception.
|
RequestAdapter |
getRequestAdapter() |
Gets the request adapter.
|
ResponseAdapter |
getResponseAdapter() |
Gets the response adapter.
|
java.lang.Throwable |
getRootCauseOfRaisedException() |
Returns the innermost one of the chained (wrapped) exceptions.
|
SessionAdapter |
getSessionAdapter() |
Gets the session adapter.
|
<T> T |
getSetting(java.lang.String settingName) |
Gets the setting value in the translet scope.
|
TemplateProcessor |
getTemplateProcessor() |
Gets the template processor.
|
protected TransletRuleRegistry |
getTransletRuleRegistry() |
Gets the translet rule registry.
|
boolean |
isExceptionRaised() |
Returns whether the exception was thrown.
|
boolean |
isIncluded() |
Returns whether or not contained in other activity.
|
protected void |
prepareAspectAdviceRule(TransletRule transletRule) |
|
protected void |
putAdviceResult(AspectAdviceRule aspectAdviceRule,
java.lang.Object adviceActionResult) |
Puts the result of the advice.
|
protected void |
putAspectAdviceBean(java.lang.String aspectId,
java.lang.Object adviceBean) |
Puts the aspect advice bean.
|
void |
registerAspectRule(AspectRule aspectRule) |
Register an aspect rule dynamically.
|
protected void |
removeCurrentActivity() |
Removes the current activity.
|
protected void |
saveCurrentActivity() |
Saves the current activity.
|
void |
setIncluded(boolean included) |
Sets whether this activity is included in other activity.
|
void |
setRaisedException(java.lang.Throwable raisedException) |
Sets an instance of the currently raised exception.
|
protected void |
setRequestAdapter(RequestAdapter requestAdapter) |
Sets the request adapter.
|
protected void |
setResponseAdapter(ResponseAdapter responseAdapter) |
Sets the response adapter.
|
protected void |
setSessionAdapter(SessionAdapter sessionAdapter) |
Sets the session adapter.
|
void |
terminate() |
Throws an ActivityTerminatedException to terminate the current activity.
|
void |
terminate(java.lang.String cause) |
Throws an ActivityTerminatedException with the reason for terminating the current activity.
|
protected AspectAdviceRuleRegistry |
touchAspectAdviceRuleRegistry() |
executeAdvice, executeAdvice, executeAdviceWithoutThrow, executeAdviceWithoutThrow, finish, getProcessResult, getProcessResult, getRequestMethod, getTranslet, getTransletName, handleException, isResponseReserved, newActivity, perform, performWithoutResponse, prepare, prepare, prepareprotected AbstractActivity(ActivityContext context)
context - the activity contextpublic ActivityContext getActivityContext()
ActivitygetActivityContext in interface Activitypublic Environment getEnvironment()
ActivitygetEnvironment in interface Activityprotected Activity getCurrentActivity()
protected void saveCurrentActivity()
protected void backupCurrentActivity()
protected void removeCurrentActivity()
public boolean isIncluded()
public void setIncluded(boolean included)
included - whether or not included in other activitypublic java.lang.Throwable getRaisedException()
ActivitygetRaisedException in interface Activitypublic void setRaisedException(java.lang.Throwable raisedException)
ActivitysetRaisedException in interface ActivityraisedException - an instance of the currently raised exceptionpublic boolean isExceptionRaised()
ActivityisExceptionRaised in interface Activitypublic java.lang.Throwable getRootCauseOfRaisedException()
ActivitygetRootCauseOfRaisedException in interface Activitypublic ApplicationAdapter getApplicationAdapter()
ActivitygetApplicationAdapter in interface Activitypublic SessionAdapter getSessionAdapter()
ActivitygetSessionAdapter in interface Activityprotected void setSessionAdapter(SessionAdapter sessionAdapter)
sessionAdapter - the new session adapterpublic RequestAdapter getRequestAdapter()
ActivitygetRequestAdapter in interface Activityprotected void setRequestAdapter(RequestAdapter requestAdapter)
requestAdapter - the new request adapterpublic ResponseAdapter getResponseAdapter()
ActivitygetResponseAdapter in interface Activityprotected void setResponseAdapter(ResponseAdapter responseAdapter)
responseAdapter - the new response adapterprotected AspectAdviceRuleRegistry touchAspectAdviceRuleRegistry()
protected java.util.List<AspectAdviceRule> getBeforeAdviceRuleList()
protected java.util.List<AspectAdviceRule> getAfterAdviceRuleList()
protected java.util.List<AspectAdviceRule> getFinallyAdviceRuleList()
protected java.util.List<ExceptionRule> getExceptionRuleList()
public <T> T getSetting(java.lang.String settingName)
ActivitygetSetting in interface ActivityT - the type of the valuesettingName - the setting namepublic <T> T getAspectAdviceBean(java.lang.String aspectId)
getAspectAdviceBean in interface ActivityT - the generic typeaspectId - the aspect idprotected void putAspectAdviceBean(java.lang.String aspectId,
java.lang.Object adviceBean)
aspectId - the aspect idadviceBean - the advice beanpublic <T> T getBeforeAdviceResult(java.lang.String aspectId)
T - the generic typeaspectId - the aspect idpublic <T> T getAfterAdviceResult(java.lang.String aspectId)
T - the generic typeaspectId - the aspect idpublic <T> T getAroundAdviceResult(java.lang.String aspectId)
T - the generic typeaspectId - the aspect idpublic <T> T getFinallyAdviceResult(java.lang.String aspectId)
T - the generic typeaspectId - the aspect idprotected void putAdviceResult(AspectAdviceRule aspectAdviceRule, java.lang.Object adviceActionResult)
aspectAdviceRule - the aspect advice ruleadviceActionResult - the advice action resultprotected AspectRuleRegistry getAspectRuleRegistry()
protected TransletRuleRegistry getTransletRuleRegistry()
public TemplateProcessor getTemplateProcessor()
ActivitygetTemplateProcessor in interface Activitypublic BeanRegistry getBeanRegistry()
ActivitygetBeanRegistry in interface Activitypublic <T> T getBean(java.lang.String id)
BeanRegistrygetBean in interface BeanRegistryT - the generic typeid - the id of the bean to retrievepublic <T> T getBean(java.lang.Class<T> requiredType)
BeanRegistrygetBean in interface BeanRegistryT - the generic typerequiredType - the type the bean must match; can be an interface or superclass. null is disallowed.public <T> T getBean(java.lang.String id,
java.lang.Class<T> requiredType)
BeanRegistrygetBean in interface BeanRegistryT - the generic typeid - the id of the bean to retrieverequiredType - type the bean must match; can be an interface or superclass. null is disallowed.public <T> T getBean(java.lang.Class<T> requiredType,
java.lang.String id)
BeanRegistrygetBean in interface BeanRegistryT - the generic typerequiredType - type the bean must match; can be an interface or superclass. null is allowed.id - the id of the bean to retrieve; if requiredType is null.public <T> T getConfigBean(java.lang.Class<T> classType)
BeanRegistryBeanNotOfRequiredTypeException.getConfigBean in interface BeanRegistryT - the generic typeclassType - type the bean must match; can be an interface or superclass. null is disallowed.public boolean containsBean(java.lang.String id)
BeanRegistrycontainsBean in interface BeanRegistryid - the id of the bean to querypublic boolean containsBean(java.lang.Class<?> requiredType)
BeanRegistrycontainsBean in interface BeanRegistryrequiredType - the object type of the bean to querypublic void terminate()
Activitypublic void terminate(java.lang.String cause)
Activitypublic void registerAspectRule(AspectRule aspectRule)
ActivityregisterAspectRule in interface ActivityaspectRule - the aspect ruleprotected void prepareAspectAdviceRule(TransletRule transletRule)
Copyright © 2008–2018 The Aspectran Project. All rights reserved.