Package org.alfresco.repo.action
Class ActionImpl
java.lang.Object
org.alfresco.repo.action.ParameterizedItemImpl
org.alfresco.repo.action.ActionImpl
- All Implemented Interfaces:
Serializable,Action,ParameterizedItem
- Direct Known Subclasses:
CompositeActionImpl,QuickShareLinkExpiryActionImpl,RenditionDefinitionImpl,ReplicationDefinitionImpl
Action implementation
- Author:
- Roy Wetherall
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionActionImpl(Action action) ActionImpl(Action action, String actionDefinitionName) ActionImpl(NodeRef nodeRef, String id, String actionDefinitionName) ConstructorActionImpl(NodeRef nodeRef, String id, String actionDefinitionName, Map<String, Serializable> parameterValues) Constructor -
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) Get the action chaingetActionCondition(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.intWhen there is more than one instance of the action executing, both with the same ID, which one is this?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 conditionsvoidsetActionChain(Set<String> actionChain) Set the action chainvoidsetActionCondition(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.voidsetCreatedDate(Date createdDate) Set the created datevoidsetCreator(String creator) Set the creatorvoidsetDescription(String description) Set the description of the actionvoidsetExecuteAsynchronously(boolean executeAsynchronously) Set the value that indicates whether the action should be executed asychronously or not.voidsetExecutionEndDate(Date endDate) Records the date when the action finished execution, normally called by theActionServicewhen the action completes or fails.voidsetExecutionFailureMessage(String message) Records the message of the exception which caused the Action to fail, if any.voidsetExecutionInstance(int instance) Called by the ActionService when the action begins running.voidsetExecutionStartDate(Date startDate) Records the date when the action began execution, normally called by theActionServicewhen it starts running the action.voidsetExecutionStatus(ActionStatus status) Updates the current execution status.voidsetModifiedDate(Date modifiedDate) Set the modified datevoidsetModifier(String modifier) Set the modifiervoidsetNodeRef(NodeRef nodeRef) Set the node referencevoidsetRunAsUser(String runAsUserName) voidsetTenantId(String tenantId) voidSet the title of the actionvoidsetTrackStatus(Boolean trackStatus) Set whether the action should be tracked or not.toString()Methods inherited from class org.alfresco.repo.action.ParameterizedItemImpl
equals, getId, getParameterValue, getParameterValues, hashCode, setParameterValue, setParameterValuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.alfresco.service.cmr.action.ParameterizedItem
getId, getParameterValue, getParameterValues, setParameterValue, setParameterValues
-
Constructor Details
-
ActionImpl
Constructor- Parameters:
nodeRef- the action node reference (null if not saved)id- the action idactionDefinitionName- the name of the action definition
-
ActionImpl
public ActionImpl(NodeRef nodeRef, String id, String actionDefinitionName, Map<String, Serializable> parameterValues) Constructor- Parameters:
nodeRef- the action node reference (null if not saved)id- the action idactionDefinitionName- the action definition nameparameterValues- the parameter values
-
ActionImpl
-
ActionImpl
-
-
Method Details
-
toString
-
getTitle
Description copied from interface:ActionGet the title of the action -
setTitle
Description copied from interface:ActionSet the title of the action -
getDescription
Description copied from interface:ActionGet the description of the action- Specified by:
getDescriptionin interfaceAction- Returns:
- the description of the action
-
setDescription
Description copied from interface:ActionSet the description of the action- Specified by:
setDescriptionin interfaceAction- Parameters:
description- the description of the action
-
getTrackStatus
- Specified by:
getTrackStatusin interfaceAction- 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
Description copied from interface:ActionSet 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.- Specified by:
setTrackStatusin interfaceAction- 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
public boolean getExecuteAsychronously()Description copied from interface:ActionA 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.
- Specified by:
getExecuteAsychronouslyin interfaceAction- Returns:
- true if the action should be executed asychronously, false otherwise.
-
setExecuteAsynchronously
public void setExecuteAsynchronously(boolean executeAsynchronously) Description copied from interface:ActionSet the value that indicates whether the action should be executed asychronously or not.- Specified by:
setExecuteAsynchronouslyin interfaceAction- Parameters:
executeAsynchronously- true if the action is to be executed asychronously, false otherwise.
-
getCompensatingAction
Description copied from interface:ActionGet the compensating action.This action is executed if the failure behaviour is to compensate and the action being executed fails.
- Specified by:
getCompensatingActionin interfaceAction- Returns:
- the compensating action
-
setCompensatingAction
Description copied from interface:ActionSet the compensating action.- Specified by:
setCompensatingActionin interfaceAction- Parameters:
action- the compensating action
-
getCreatedDate
Description copied from interface:ActionGet the date the action was created- Specified by:
getCreatedDatein interfaceAction- Returns:
- action creation date
-
setCreatedDate
Set the created date- Parameters:
createdDate- the created date
-
getCreator
Description copied from interface:ActionGet the name of the user that created the action- Specified by:
getCreatorin interfaceAction- Returns:
- user name
-
setCreator
Set the creator -
getModifiedDate
Description copied from interface:ActionGet the date that the action was last modified- Specified by:
getModifiedDatein interfaceAction- Returns:
- aciton modification date
-
setModifiedDate
Set the modified date -
getModifier
Description copied from interface:ActionGet the name of the user that last modified the action- Specified by:
getModifierin interfaceAction- Returns:
- user name
-
setModifier
Set the modifier -
getActionDefinitionName
Description copied from interface:ActionGet the name of the action definition that relates to this action- Specified by:
getActionDefinitionNamein interfaceAction- Returns:
- the action defintion name
-
hasActionConditions
public boolean hasActionConditions()Description copied from interface:ActionIndicates whether the action has any conditions specified- Specified by:
hasActionConditionsin interfaceAction- Returns:
- true if the action has any conditions specified, flase otherwise
-
indexOfActionCondition
Description copied from interface:ActionGets the index of an action condition- Specified by:
indexOfActionConditionin interfaceAction- Parameters:
actionCondition- the action condition- Returns:
- the index
-
getActionConditions
Description copied from interface:ActionGets a list of the action conditions for this action- Specified by:
getActionConditionsin interfaceAction- Returns:
- list of action conditions
-
getActionCondition
Description copied from interface:ActionGet the action condition at a given index- Specified by:
getActionConditionin interfaceAction- Parameters:
index- the index- Returns:
- the action condition
-
addActionCondition
Description copied from interface:ActionAdd an action condition to the action- Specified by:
addActionConditionin interfaceAction- Parameters:
actionCondition- an action condition
-
addActionCondition
Description copied from interface:ActionAdd an action condition at the given index- Specified by:
addActionConditionin interfaceAction- Parameters:
index- the indexactionCondition- the action condition
-
setActionCondition
Description copied from interface:ActionReplaces the current action condition at the given index with the action condition provided.- Specified by:
setActionConditionin interfaceAction- Parameters:
index- the indexactionCondition- the action condition
-
removeActionCondition
Description copied from interface:ActionRemoves an action condition- Specified by:
removeActionConditionin interfaceAction- Parameters:
actionCondition- an action condition
-
removeAllActionConditions
public void removeAllActionConditions()Description copied from interface:ActionRemoves all action conditions- Specified by:
removeAllActionConditionsin interfaceAction
-
setActionChain
Set the action chain- Parameters:
actionChain- the list of actions that lead to this action
-
getActionChain
Get the action chain- Returns:
- the list of actions that lead to this action
-
getRunAsUser
-
getTenantId
-
setRunAsUser
-
setTenantId
-
getNodeRef
Description copied from interface:ActionGets the node ref that represents the saved action node. Returns null id unsaved.- Specified by:
getNodeRefin interfaceAction- Returns:
- the action node reference
-
setNodeRef
Set the node reference- Parameters:
nodeRef- the node reference
-
addParameterValues
Description copied from interface:Action- Specified by:
addParameterValuesin interfaceAction- Parameters:
values- A map of values to be added
-
getExecutionInstance
public int getExecutionInstance()When there is more than one instance of the action executing, both with the same ID, which one is this? This crops up most often with persisted actions, with two copies running, one on each of two different target nodes. -
setExecutionInstance
public void setExecutionInstance(int instance) Called by the ActionService when the action begins running. -
getExecutionStartDate
Description copied from interface:ActionGets 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.- Specified by:
getExecutionStartDatein interfaceAction- Returns:
- The date the action (last) began executing at, or null.
-
setExecutionStartDate
Records the date when the action began execution, normally called by theActionServicewhen it starts running the action. -
getExecutionEndDate
Description copied from interface:ActionGets 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.- Specified by:
getExecutionEndDatein interfaceAction- Returns:
- The date the action last finished exeucting at, or null.
-
setExecutionEndDate
Records the date when the action finished execution, normally called by theActionServicewhen the action completes or fails. -
getExecutionStatus
Description copied from interface:ActionGets the current execution status of the action, such as Running or Completed.- Specified by:
getExecutionStatusin interfaceAction- Returns:
- The current execution status
-
setExecutionStatus
Updates the current execution status. This is normally called by theActionServiceas it progresses the Action's execution. -
getExecutionFailureMessage
Description copied from interface:ActionGets the message of the exception which caused the Action execution failure, or null if the Action hasn't failed / has been retried.- Specified by:
getExecutionFailureMessagein interfaceAction- Returns:
- The exception message, if the action has failed
-
setExecutionFailureMessage
Records the message of the exception which caused the Action to fail, if any.
-