Interface Action

All Superinterfaces:
ParameterizedItem
All Known Subinterfaces:
CancellableAction, CompositeAction, CompositeRenditionDefinition, QuickShareLinkExpiryAction, RenditionDefinition, ReplicationDefinition
All Known Implementing Classes:
ActionImpl, CompositeActionImpl, CompositeRenditionDefinitionImpl, QuickShareLinkExpiryActionImpl, RenditionDefinitionImpl, ReplicationDefinitionImpl

@AlfrescoPublicApi public interface Action extends ParameterizedItem
The rule action interface
Author:
Roy Wetherall
  • Method Details

    • getNodeRef

      NodeRef getNodeRef()
      Gets the node ref that represents the saved action node. Returns null id unsaved.
      Returns:
      the action node reference
    • getActionDefinitionName

      String getActionDefinitionName()
      Get the name of the action definition that relates to this action
      Returns:
      the action defintion name
    • getTitle

      String getTitle()
      Get the title of the action
      Returns:
      the title of the action
    • setTitle

      void setTitle(String title)
      Set the title of the action
      Parameters:
      title - the title of the action
    • getDescription

      String getDescription()
      Get the description of the action
      Returns:
      the description of the action
    • setDescription

      void setDescription(String description)
      Set the description of the action
      Parameters:
      description - the description of the action
    • getTrackStatus

      Boolean getTrackStatus()
      Returns:
      true if the action must be tracked by the ActionTrackingService, false if it must NOT be tracked or null to use the action definition's default.
    • setTrackStatus

      void setTrackStatus(Boolean trackStatus)
      Set whether the action should be tracked or not.

      The option of tracking can be null i.e. unset, indicating that the defaults of the action definition should be used. This is to allow manual overriding of the property when it becomes supported by the UI.

      Parameters:
      trackStatus - true if the action must be tracked by the ActionTrackingService, false if it must NOT be tracked or null to use the action definition's default.
    • getExecuteAsychronously

      boolean getExecuteAsychronously()
      A guide for the ActionService; Should the action be executed asychronously or not? It is not a general purpose flag to indicate the action is running asychronously.

      The default is to execute the action synchronously.

      Returns:
      true if the action should be executed asychronously, false otherwise.
    • setExecuteAsynchronously

      void setExecuteAsynchronously(boolean executeAsynchronously)
      Set the value that indicates whether the action should be executed asychronously or not.
      Parameters:
      executeAsynchronously - true if the action is to be executed asychronously, false otherwise.
    • getCompensatingAction

      Action getCompensatingAction()
      Get the compensating action.

      This action is executed if the failure behaviour is to compensate and the action being executed fails.

      Returns:
      the compensating action
    • setCompensatingAction

      void setCompensatingAction(Action action)
      Set the compensating action.
      Parameters:
      action - the compensating action
    • getCreatedDate

      Date getCreatedDate()
      Get the date the action was created
      Returns:
      action creation date
    • getCreator

      String getCreator()
      Get the name of the user that created the action
      Returns:
      user name
    • getModifiedDate

      Date getModifiedDate()
      Get the date that the action was last modified
      Returns:
      aciton modification date
    • getModifier

      String getModifier()
      Get the name of the user that last modified the action
      Returns:
      user name
    • hasActionConditions

      boolean hasActionConditions()
      Indicates whether the action has any conditions specified
      Returns:
      true if the action has any conditions specified, flase otherwise
    • indexOfActionCondition

      int indexOfActionCondition(ActionCondition actionCondition)
      Gets the index of an action condition
      Parameters:
      actionCondition - the action condition
      Returns:
      the index
    • getActionConditions

      List<ActionCondition> getActionConditions()
      Gets a list of the action conditions for this action
      Returns:
      list of action conditions
    • getActionCondition

      ActionCondition getActionCondition(int index)
      Get the action condition at a given index
      Parameters:
      index - the index
      Returns:
      the action condition
    • addActionCondition

      void addActionCondition(ActionCondition actionCondition)
      Add an action condition to the action
      Parameters:
      actionCondition - an action condition
    • addActionCondition

      void addActionCondition(int index, ActionCondition actionCondition)
      Add an action condition at the given index
      Parameters:
      index - the index
      actionCondition - the action condition
    • setActionCondition

      void setActionCondition(int index, ActionCondition actionCondition)
      Replaces the current action condition at the given index with the action condition provided.
      Parameters:
      index - the index
      actionCondition - the action condition
    • removeActionCondition

      void removeActionCondition(ActionCondition actionCondition)
      Removes an action condition
      Parameters:
      actionCondition - an action condition
    • removeAllActionConditions

      void removeAllActionConditions()
      Removes all action conditions
    • addParameterValues

      void addParameterValues(Map<String,Serializable> values)
      Adds a Map of parameter values to the Action
      Parameters:
      values - A map of values to be added
    • getExecutionStartDate

      Date getExecutionStartDate()
      Gets the date that the action (last) began executing at. Null if the action has not yet been run. For a saved action, this will be the last time at ran.
      Returns:
      The date the action (last) began executing at, or null.
    • getExecutionEndDate

      Date getExecutionEndDate()
      Gets the date that the action (last) finished execution at. Null if the action has not yet been run, or is currently running. For a saved action, this will normally be the last time it finished running.
      Returns:
      The date the action last finished exeucting at, or null.
    • getExecutionStatus

      ActionStatus getExecutionStatus()
      Gets the current execution status of the action, such as Running or Completed.
      Returns:
      The current execution status
    • getExecutionFailureMessage

      String getExecutionFailureMessage()
      Gets the message of the exception which caused the Action execution failure, or null if the Action hasn't failed / has been retried.
      Returns:
      The exception message, if the action has failed