Package com.aspectran.core.activity
Class AbstractActivity
java.lang.Object
com.aspectran.core.activity.AbstractActivity
- All Implemented Interfaces:
Activity
- Direct Known Subclasses:
AdviceActivity
,DefaultActivity
The Class AbstractActivity.
Created: 2008. 03. 22 PM 5:48:09
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractActivity
(ActivityContext context) Instantiates a new abstract activity. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the exception that occurred during activity processing.boolean
containsBean
(Class<?> type) Returns whether a bean with the specified object type is present.boolean
containsBean
(Class<?> type, String id) Returns whether the bean corresponding to the specified object type and ID exists.boolean
containsBean
(String id) Returns whether a bean with the specified id is present.Gets the activity context.Gets the application adapter.<V> V
Returns an instance of the bean that matches the given object type.<V> V
Returns an instance of the bean that matches the given object type.<V> V
Returns an instance of the bean that matches the given id.protected Activity
Gets the current activity.Returns the environment of the current activity context.protected <V extends Activity>
V<V> V
getPrototypeScopeBean
(BeanRule beanRule) Returns an instance of the currently raised exception.Gets the request adapter.Gets the response adapter.Returns the innermost one of the chained (wrapped) exceptions.Gets the session adapter.protected boolean
boolean
Returns whether an exception was thrown in the activity.protected void
Removes the current activity.protected void
Saves the current activity.void
setRaisedException
(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
Throws an ActivityTerminatedException to terminate the current activity.void
Throws an ActivityTerminatedException with the reason for terminating the current activity.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aspectran.core.activity.Activity
executeAdvice, executeAdvice, getAspectAdviceBean, getContextPath, getDeclaredResponse, getProcessResult, getProcessResult, getSetting, getTranslet, handleException, isCommitted, isRequestWithContextPath, isResponseReserved, perform, perform, putSetting, registerAspectAdviceRule, registerSettingsAdviceRule
-
Constructor Details
-
AbstractActivity
Instantiates a new abstract activity.- Parameters:
context
- the activity context
-
-
Method Details
-
getActivityContext
Description copied from interface:Activity
Gets the activity context.- Specified by:
getActivityContext
in interfaceActivity
- Returns:
- the activity context
-
getClassLoader
- Specified by:
getClassLoader
in interfaceActivity
-
getEnvironment
Description copied from interface:Activity
Returns the environment of the current activity context.- Specified by:
getEnvironment
in interfaceActivity
- Returns:
- the environment
-
getCurrentActivity
Gets the current activity.- Returns:
- the current activity
-
saveCurrentActivity
protected void saveCurrentActivity()Saves the current activity. -
removeCurrentActivity
protected void removeCurrentActivity()Removes the current activity. -
getParentActivity
-
hasParentActivity
protected boolean hasParentActivity() -
getApplicationAdapter
Description copied from interface:Activity
Gets the application adapter.- Specified by:
getApplicationAdapter
in interfaceActivity
- Returns:
- the application adapter
-
getSessionAdapter
Description copied from interface:Activity
Gets the session adapter.- Specified by:
getSessionAdapter
in interfaceActivity
- Returns:
- the session adapter
-
setSessionAdapter
Sets the session adapter.- Parameters:
sessionAdapter
- the new session adapter
-
getRequestAdapter
Description copied from interface:Activity
Gets the request adapter.- Specified by:
getRequestAdapter
in interfaceActivity
- Returns:
- the request adapter
-
setRequestAdapter
Sets the request adapter.- Parameters:
requestAdapter
- the new request adapter
-
getResponseAdapter
Description copied from interface:Activity
Gets the response adapter.- Specified by:
getResponseAdapter
in interfaceActivity
- Returns:
- the response adapter
-
setResponseAdapter
Sets the response adapter.- Parameters:
responseAdapter
- the new response adapter
-
isExceptionRaised
public boolean isExceptionRaised()Description copied from interface:Activity
Returns whether an exception was thrown in the activity.- Specified by:
isExceptionRaised
in interfaceActivity
- Returns:
- true if there was an exception thrown by the activity, false otherwise
-
getRaisedException
Description copied from interface:Activity
Returns an instance of the currently raised exception.- Specified by:
getRaisedException
in interfaceActivity
- Returns:
- an instance of the currently raised exception
-
getRootCauseOfRaisedException
Description copied from interface:Activity
Returns the innermost one of the chained (wrapped) exceptions.- Specified by:
getRootCauseOfRaisedException
in interfaceActivity
- Returns:
- the innermost one of the chained (wrapped) exceptions
-
setRaisedException
Description copied from interface:Activity
Sets an instance of the currently raised exception.- Specified by:
setRaisedException
in interfaceActivity
- Parameters:
raisedException
- an instance of the currently raised exception
-
clearRaisedException
public void clearRaisedException()Description copied from interface:Activity
Clears the exception that occurred during activity processing.- Specified by:
clearRaisedException
in interfaceActivity
-
terminate
Description copied from interface:Activity
Throws an ActivityTerminatedException to terminate the current activity.- Specified by:
terminate
in interfaceActivity
- Throws:
ActivityTerminatedException
- if an activity terminated without completion
-
terminate
Description copied from interface:Activity
Throws an ActivityTerminatedException with the reason for terminating the current activity.- Specified by:
terminate
in interfaceActivity
- Parameters:
cause
- the termination cause- Throws:
ActivityTerminatedException
- the exception to terminate activity
-
getBean
Description copied from interface:Activity
Returns an instance of the bean that matches the given id. -
getBean
Description copied from interface:Activity
Returns an instance of the bean that matches the given object type. -
getBean
Description copied from interface:Activity
Returns an instance of the bean that matches the given object type. -
getPrototypeScopeBean
- Specified by:
getPrototypeScopeBean
in interfaceActivity
-
containsBean
Description copied from interface:Activity
Returns whether a bean with the specified id is present.- Specified by:
containsBean
in interfaceActivity
- Parameters:
id
- the id of the bean to query- Returns:
- whether a bean with the specified id is present
-
containsBean
Description copied from interface:Activity
Returns whether a bean with the specified object type is present.- Specified by:
containsBean
in interfaceActivity
- Parameters:
type
- the object type of the bean to query- Returns:
- whether a bean with the specified type is present
-
containsBean
Description copied from interface:Activity
Returns whether the bean corresponding to the specified object type and ID exists.- Specified by:
containsBean
in interfaceActivity
- Parameters:
type
- the object type of the bean to queryid
- the id of the bean to query- Returns:
- whether a bean with the specified type is present
-