Class AbstractActivity

java.lang.Object
com.aspectran.core.activity.AbstractActivity
All Implemented Interfaces:
Activity
Direct Known Subclasses:
AdviceActivity, DefaultActivity

public abstract class AbstractActivity extends Object implements Activity
The Class AbstractActivity.

Created: 2008. 03. 22 PM 5:48:09

  • Constructor Details

    • AbstractActivity

      protected AbstractActivity(@NonNull ActivityContext context)
      Instantiates a new abstract activity.
      Parameters:
      context - the activity context
  • Method Details

    • getActivityContext

      public ActivityContext getActivityContext()
      Description copied from interface: Activity
      Gets the activity context.
      Specified by:
      getActivityContext in interface Activity
      Returns:
      the activity context
    • getClassLoader

      public ClassLoader getClassLoader()
      Specified by:
      getClassLoader in interface Activity
    • getEnvironment

      public Environment getEnvironment()
      Description copied from interface: Activity
      Returns the environment of the current activity context.
      Specified by:
      getEnvironment in interface Activity
      Returns:
      the environment
    • getCurrentActivity

      protected Activity 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

      protected <V extends Activity> V getParentActivity()
    • hasParentActivity

      protected boolean hasParentActivity()
    • getApplicationAdapter

      public ApplicationAdapter getApplicationAdapter()
      Description copied from interface: Activity
      Gets the application adapter.
      Specified by:
      getApplicationAdapter in interface Activity
      Returns:
      the application adapter
    • getSessionAdapter

      public SessionAdapter getSessionAdapter()
      Description copied from interface: Activity
      Gets the session adapter.
      Specified by:
      getSessionAdapter in interface Activity
      Returns:
      the session adapter
    • setSessionAdapter

      protected void setSessionAdapter(SessionAdapter sessionAdapter)
      Sets the session adapter.
      Parameters:
      sessionAdapter - the new session adapter
    • getRequestAdapter

      public RequestAdapter getRequestAdapter()
      Description copied from interface: Activity
      Gets the request adapter.
      Specified by:
      getRequestAdapter in interface Activity
      Returns:
      the request adapter
    • setRequestAdapter

      protected void setRequestAdapter(RequestAdapter requestAdapter)
      Sets the request adapter.
      Parameters:
      requestAdapter - the new request adapter
    • getResponseAdapter

      public ResponseAdapter getResponseAdapter()
      Description copied from interface: Activity
      Gets the response adapter.
      Specified by:
      getResponseAdapter in interface Activity
      Returns:
      the response adapter
    • setResponseAdapter

      protected void setResponseAdapter(ResponseAdapter responseAdapter)
      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 interface Activity
      Returns:
      true if there was an exception thrown by the activity, false otherwise
    • getRaisedException

      public Throwable getRaisedException()
      Description copied from interface: Activity
      Returns an instance of the currently raised exception.
      Specified by:
      getRaisedException in interface Activity
      Returns:
      an instance of the currently raised exception
    • getRootCauseOfRaisedException

      public Throwable getRootCauseOfRaisedException()
      Description copied from interface: Activity
      Returns the innermost one of the chained (wrapped) exceptions.
      Specified by:
      getRootCauseOfRaisedException in interface Activity
      Returns:
      the innermost one of the chained (wrapped) exceptions
    • setRaisedException

      public void setRaisedException(Throwable raisedException)
      Description copied from interface: Activity
      Sets an instance of the currently raised exception.
      Specified by:
      setRaisedException in interface Activity
      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 interface Activity
    • terminate

      public void terminate() throws ActivityTerminatedException
      Description copied from interface: Activity
      Throws an ActivityTerminatedException to terminate the current activity.
      Specified by:
      terminate in interface Activity
      Throws:
      ActivityTerminatedException - if an activity terminated without completion
    • terminate

      public void terminate(String cause) throws ActivityTerminatedException
      Description copied from interface: Activity
      Throws an ActivityTerminatedException with the reason for terminating the current activity.
      Specified by:
      terminate in interface Activity
      Parameters:
      cause - the termination cause
      Throws:
      ActivityTerminatedException - the exception to terminate activity
    • getBean

      public <V> V getBean(String id)
      Description copied from interface: Activity
      Returns an instance of the bean that matches the given id.
      Specified by:
      getBean in interface Activity
      Type Parameters:
      V - the type of bean object retrieved
      Parameters:
      id - the id of the bean to retrieve
      Returns:
      an instance of the bean
    • getBean

      public <V> V getBean(Class<V> type)
      Description copied from interface: Activity
      Returns an instance of the bean that matches the given object type.
      Specified by:
      getBean in interface Activity
      Type Parameters:
      V - the type of bean object retrieved
      Parameters:
      type - the type the bean must match; can be an interface or superclass. null is disallowed.
      Returns:
      an instance of the bean
    • getBean

      public <V> V getBean(Class<V> type, String id)
      Description copied from interface: Activity
      Returns an instance of the bean that matches the given object type.
      Specified by:
      getBean in interface Activity
      Type Parameters:
      V - the type of bean object retrieved
      Parameters:
      type - type the bean must match; can be an interface or superclass. null is allowed.
      id - the id of the bean to retrieve
      Returns:
      an instance of the bean
    • getPrototypeScopeBean

      public <V> V getPrototypeScopeBean(BeanRule beanRule)
      Specified by:
      getPrototypeScopeBean in interface Activity
    • containsBean

      public boolean containsBean(String id)
      Description copied from interface: Activity
      Returns whether a bean with the specified id is present.
      Specified by:
      containsBean in interface Activity
      Parameters:
      id - the id of the bean to query
      Returns:
      whether a bean with the specified id is present
    • containsBean

      public boolean containsBean(Class<?> type)
      Description copied from interface: Activity
      Returns whether a bean with the specified object type is present.
      Specified by:
      containsBean in interface Activity
      Parameters:
      type - the object type of the bean to query
      Returns:
      whether a bean with the specified type is present
    • containsBean

      public boolean containsBean(Class<?> type, String id)
      Description copied from interface: Activity
      Returns whether the bean corresponding to the specified object type and ID exists.
      Specified by:
      containsBean in interface Activity
      Parameters:
      type - the object type of the bean to query
      id - the id of the bean to query
      Returns:
      whether a bean with the specified type is present