Package org.alfresco.service.cmr.action
Interface Action
- All Superinterfaces:
ParameterizedItem
- All Known Subinterfaces:
CancellableAction,CompositeAction,CompositeRenditionDefinition,QuickShareLinkExpiryAction,RenditionDefinition,ReplicationDefinition
- All Known Implementing Classes:
ActionImpl,CompositeActionImpl,CompositeRenditionDefinitionImpl,QuickShareLinkExpiryActionImpl,RenditionDefinitionImpl,ReplicationDefinitionImpl
The rule action interface
- Author:
- Roy Wetherall
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddActionCondition(int index, ActionCondition actionCondition) Add an action condition at the given indexvoidaddActionCondition(ActionCondition actionCondition) Add an action condition to the actionvoidaddParameterValues(Map<String, Serializable> values) getActionCondition(int index) Get the action condition at a given indexGets a list of the action conditions for this actionGet the name of the action definition that relates to this actionGet the compensating action.Get the date the action was createdGet the name of the user that created the actionGet the description of the actionbooleanA guide for the ActionService; Should the action be executed asychronously or not?Gets the date that the action (last) finished execution at.Gets the message of the exception which caused the Action execution failure, or null if the Action hasn't failed / has been retried.Gets the date that the action (last) began executing at.Gets the current execution status of the action, such as Running or Completed.Get the date that the action was last modifiedGet the name of the user that last modified the actionGets the node ref that represents the saved action node.getTitle()Get the title of the actionbooleanIndicates whether the action has any conditions specifiedintindexOfActionCondition(ActionCondition actionCondition) Gets the index of an action conditionvoidremoveActionCondition(ActionCondition actionCondition) Removes an action conditionvoidRemoves all action conditionsvoidsetActionCondition(int index, ActionCondition actionCondition) Replaces the current action condition at the given index with the action condition provided.voidsetCompensatingAction(Action action) Set the compensating action.voidsetDescription(String description) Set the description of the actionvoidsetExecuteAsynchronously(boolean executeAsynchronously) Set the value that indicates whether the action should be executed asychronously or not.voidSet the title of the actionvoidsetTrackStatus(Boolean trackStatus) Set whether the action should be tracked or not.Methods inherited from interface org.alfresco.service.cmr.action.ParameterizedItem
getId, getParameterValue, getParameterValues, setParameterValue, setParameterValues
-
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
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
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
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 theActionTrackingService, 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
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
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
Get the action condition at a given index- Parameters:
index- the index- Returns:
- the action condition
-
addActionCondition
Add an action condition to the action- Parameters:
actionCondition- an action condition
-
addActionCondition
Add an action condition at the given index- Parameters:
index- the indexactionCondition- the action condition
-
setActionCondition
Replaces the current action condition at the given index with the action condition provided.- Parameters:
index- the indexactionCondition- the action condition
-
removeActionCondition
Removes an action condition- Parameters:
actionCondition- an action condition
-
removeAllActionConditions
void removeAllActionConditions()Removes all action conditions -
addParameterValues
- 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
-