Class DefaultActivity

java.lang.Object
com.aspectran.core.activity.AbstractActivity
com.aspectran.core.activity.DefaultActivity
All Implemented Interfaces:
Activity

public class DefaultActivity extends AbstractActivity
Default activity used only internally when there is no official activity.

Note that this is an activity that has nothing to do with advice. This does not execute any advice at all, and if you attempt to register the advice dynamically, you will get an exception of the advice constraint violation.

  • Constructor Details

    • DefaultActivity

      public DefaultActivity(ActivityContext context)
      Instantiates a new DefaultActivity.
      Parameters:
      context - the activity context
  • Method Details

    • getContextPath

      public String getContextPath()
      Description copied from interface: Activity
      Returns the context path. If the context path is not specified, null is returned rather than an empty string.
      Returns:
      the context path
    • isRequestWithContextPath

      public boolean isRequestWithContextPath()
      Description copied from interface: Activity
      Returns whether the request name has a context path.
      Returns:
      true if request name with context path, false otherwise.
    • perform

      public void perform()
      Description copied from interface: Activity
      Performs the prepared activity.
    • perform

      public <V> V perform(InstantAction<V> instantAction)
      Description copied from interface: Activity
      Performs the given instant activity.
      Type Parameters:
      V - the result type of the instant action
      Parameters:
      instantAction - the instant action
      Returns:
      An object that is the result of performing an instant activity
    • getTranslet

      public Translet getTranslet()
      Description copied from interface: Activity
      Returns an instance of the current translet.
      Returns:
      an instance of the current translet
    • getProcessResult

      public ProcessResult getProcessResult()
      Description copied from interface: Activity
      Returns the process result.
      Returns:
      the process result
    • getProcessResult

      public Object getProcessResult(String actionId)
      Description copied from interface: Activity
      Returns an action result for the specified action id from the process result, or null if the action does not exist.
      Parameters:
      actionId - the specified action id
      Returns:
      an action result
    • getDeclaredResponse

      public Response getDeclaredResponse()
      Description copied from interface: Activity
      Returns the originally declared response.
      Returns:
      the declared response
    • isResponseReserved

      public boolean isResponseReserved()
      Description copied from interface: Activity
      Returns whether the response is reserved.
      Returns:
      true, if the response is reserved
    • isCommitted

      public boolean isCommitted()
      Description copied from interface: Activity
      Returns whether a response was attempted after performing the activity.
      Returns:
      true if a response was attempted, false otherwise
    • registerAspectAdviceRule

      public void registerAspectAdviceRule(AspectRule aspectRule)
      Description copied from interface: Activity
      Register an aspect rule dynamically.
      Parameters:
      aspectRule - the aspect rule
    • registerSettingsAdviceRule

      public void registerSettingsAdviceRule(SettingsAdviceRule settingsAdviceRule)
      Description copied from interface: Activity
      Register a settings advice rule dynamically.
      Parameters:
      settingsAdviceRule - the settings advice rule
    • executeAdvice

      public void executeAdvice(List<AspectAdviceRule> aspectAdviceRuleList, boolean throwable)
      Description copied from interface: Activity
      Execute aspect advices with given rules.
      Parameters:
      aspectAdviceRuleList - the aspect advice rules
      throwable - whether to raise an exception
    • executeAdvice

      public void executeAdvice(AspectAdviceRule aspectAdviceRule, boolean throwable)
      Description copied from interface: Activity
      Executes an aspect advice with a given rule.
      Parameters:
      aspectAdviceRule - the aspect advice rule
      throwable - whether to raise an exception
    • handleException

      public void handleException(List<ExceptionRule> exceptionRuleList)
      Description copied from interface: Activity
      Exception handling.
      Parameters:
      exceptionRuleList - the exception rule list
    • getSetting

      public <V> V getSetting(String name)
      Description copied from interface: Activity
      Gets the specified setting value from the current activity scope.
      Type Parameters:
      V - the type of the value
      Parameters:
      name - the setting name
      Returns:
      the setting value
    • putSetting

      public void putSetting(String name, Object value)
      Description copied from interface: Activity
      Puts the specified setting value in the current activity scope.
      Parameters:
      name - the setting name
      value - the setting value
    • getAspectAdviceBean

      public <V> V getAspectAdviceBean(String aspectId)
      Description copied from interface: Activity
      Gets the aspect advice bean.
      Type Parameters:
      V - the type of the bean
      Parameters:
      aspectId - the aspect id
      Returns:
      the aspect advice bean object