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
@AlfrescoPublicApi public interface Action extends ParameterizedItem
The rule action interface- Author:
- Roy Wetherall
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddActionCondition(int index, ActionCondition actionCondition)Add an action condition at the given indexvoidaddActionCondition(ActionCondition actionCondition)Add an action condition to the actionvoidaddParameterValues(java.util.Map<java.lang.String,java.io.Serializable> values)Adds aMapof parameter values to theActionActionConditiongetActionCondition(int index)Get the action condition at a given indexjava.util.List<ActionCondition>getActionConditions()Gets a list of the action conditions for this actionjava.lang.StringgetActionDefinitionName()Get the name of the action definition that relates to this actionActiongetCompensatingAction()Get the compensating action.java.util.DategetCreatedDate()Get the date the action was createdjava.lang.StringgetCreator()Get the name of the user that created the actionjava.lang.StringgetDescription()Get the description of the actionbooleangetExecuteAsychronously()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.java.util.DategetExecutionEndDate()Gets the date that the action (last) finished execution at.java.lang.StringgetExecutionFailureMessage()Gets the message of the exception which caused the Action execution failure, or null if the Action hasn't failed / has been retried.java.util.DategetExecutionStartDate()Gets the date that the action (last) began executing at.ActionStatusgetExecutionStatus()Gets the current execution status of the action, such as Running or Completed.java.util.DategetModifiedDate()Get the date that the action was last modifiedjava.lang.StringgetModifier()Get the name of the user that last modified the actionorg.alfresco.service.cmr.repository.NodeRefgetNodeRef()Gets the node ref that represents the saved action node.java.lang.StringgetTitle()Get the title of the actionjava.lang.BooleangetTrackStatus()booleanhasActionConditions()Indicates whether the action has any conditions specifiedintindexOfActionCondition(ActionCondition actionCondition)Gets the index of an action conditionvoidremoveActionCondition(ActionCondition actionCondition)Removes an action conditionvoidremoveAllActionConditions()Removes 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(java.lang.String description)Set the description of the actionvoidsetExecuteAsynchronously(boolean executeAsynchronously)Set the value that indicates whether the action should be executed asychronously or not.voidsetTitle(java.lang.String title)Set the title of the actionvoidsetTrackStatus(java.lang.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 Detail
-
getNodeRef
org.alfresco.service.cmr.repository.NodeRef getNodeRef()
Gets the node ref that represents the saved action node. Returns null id unsaved.- Returns:
- the action node reference
-
getActionDefinitionName
java.lang.String getActionDefinitionName()
Get the name of the action definition that relates to this action- Returns:
- the action defintion name
-
getTitle
java.lang.String getTitle()
Get the title of the action- Returns:
- the title of the action
-
setTitle
void setTitle(java.lang.String title)
Set the title of the action- Parameters:
title- the title of the action
-
getDescription
java.lang.String getDescription()
Get the description of the action- Returns:
- the description of the action
-
setDescription
void setDescription(java.lang.String description)
Set the description of the action- Parameters:
description- the description of the action
-
getTrackStatus
java.lang.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(java.lang.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 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
void setCompensatingAction(Action action)
Set the compensating action.- Parameters:
action- the compensating action
-
getCreatedDate
java.util.Date getCreatedDate()
Get the date the action was created- Returns:
- action creation date
-
getCreator
java.lang.String getCreator()
Get the name of the user that created the action- Returns:
- user name
-
getModifiedDate
java.util.Date getModifiedDate()
Get the date that the action was last modified- Returns:
- aciton modification date
-
getModifier
java.lang.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
java.util.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 indexactionCondition- 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 indexactionCondition- 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(java.util.Map<java.lang.String,java.io.Serializable> values)
Adds aMapof parameter values to theAction- Parameters:
values- A map of values to be added
-
getExecutionStartDate
java.util.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
java.util.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
java.lang.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
-
-