public class ActionImpl extends ParameterizedItemImpl implements Action
Constructor and Description |
---|
ActionImpl(Action action) |
ActionImpl(Action action,
String actionDefinitionName) |
ActionImpl(org.alfresco.service.cmr.repository.NodeRef nodeRef,
String id,
String actionDefinitionName)
Constructor
|
ActionImpl(org.alfresco.service.cmr.repository.NodeRef nodeRef,
String id,
String actionDefinitionName,
Map<String,Serializable> parameterValues)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addActionCondition(ActionCondition actionCondition)
Add an action condition to the action
|
void |
addActionCondition(int index,
ActionCondition actionCondition)
Add an action condition at the given index
|
void |
addParameterValues(Map<String,Serializable> values)
|
Set<String> |
getActionChain()
Get the action chain
|
ActionCondition |
getActionCondition(int index)
Get the action condition at a given index
|
List<ActionCondition> |
getActionConditions()
Gets a list of the action conditions for this action
|
String |
getActionDefinitionName()
Get the name of the action definition that relates to this action
|
Action |
getCompensatingAction()
Get the compensating action.
|
Date |
getCreatedDate()
Get the date the action was created
|
String |
getCreator()
Get the name of the user that created the action
|
String |
getDescription()
Get the description of the action
|
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.
|
Date |
getExecutionEndDate()
Gets the date that the action (last) finished
execution at.
|
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.
|
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.
|
Date |
getExecutionStartDate()
Gets the date that the action (last) began executing at.
|
ActionStatus |
getExecutionStatus()
Gets the current execution status of the action,
such as Running or Completed.
|
Date |
getModifiedDate()
Get the date that the action was last modified
|
String |
getModifier()
Get the name of the user that last modified the action
|
org.alfresco.service.cmr.repository.NodeRef |
getNodeRef()
Gets the node ref that represents the saved action node.
|
String |
getRunAsUser() |
String |
getTenantId() |
String |
getTitle()
Get the title of the action
|
Boolean |
getTrackStatus() |
boolean |
hasActionConditions()
Indicates whether the action has any conditions specified
|
int |
indexOfActionCondition(ActionCondition actionCondition)
Gets the index of an action condition
|
void |
removeActionCondition(ActionCondition actionCondition)
Removes an action condition
|
void |
removeAllActionConditions()
Removes all action conditions
|
void |
setActionChain(Set<String> actionChain)
Set the action chain
|
void |
setActionCondition(int index,
ActionCondition actionCondition)
Replaces the current action condition at the given index with the
action condition provided.
|
void |
setCompensatingAction(Action action)
Set the compensating action.
|
void |
setCreatedDate(Date createdDate)
Set the created date
|
void |
setCreator(String creator)
Set the creator
|
void |
setDescription(String description)
Set the description of the action
|
void |
setExecuteAsynchronously(boolean executeAsynchronously)
Set the value that indicates whether the action should be executed asychronously or not.
|
void |
setExecutionEndDate(Date endDate)
Records the date when the action finished execution,
normally called by the
ActionService when
the action completes or fails. |
void |
setExecutionFailureMessage(String message)
Records the message of the exception which caused the
Action to fail, if any.
|
void |
setExecutionInstance(int instance)
Called by the ActionService when the action begins running.
|
void |
setExecutionStartDate(Date startDate)
Records the date when the action began execution,
normally called by the
ActionService when
it starts running the action. |
void |
setExecutionStatus(ActionStatus status)
Updates the current execution status.
|
void |
setModifiedDate(Date modifiedDate)
Set the modified date
|
void |
setModifier(String modifier)
Set the modifier
|
void |
setNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Set the node reference
|
void |
setRunAsUser(String runAsUserName) |
void |
setTenantId(String tenantId) |
void |
setTitle(String title)
Set the title of the action
|
void |
setTrackStatus(Boolean trackStatus)
Set whether the action should be tracked or not.
|
String |
toString() |
equals, getId, getParameterValue, getParameterValues, hashCode, setParameterValue, setParameterValues
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getParameterValue, getParameterValues, setParameterValue, setParameterValues
public ActionImpl(org.alfresco.service.cmr.repository.NodeRef nodeRef, String id, String actionDefinitionName)
nodeRef
- the action node reference (null if not saved)id
- the action idactionDefinitionName
- the name of the action definitionpublic ActionImpl(org.alfresco.service.cmr.repository.NodeRef nodeRef, String id, String actionDefinitionName, Map<String,Serializable> parameterValues)
nodeRef
- the action node reference (null if not saved)id
- the action idactionDefinitionName
- the action definition nameparameterValues
- the parameter valuespublic ActionImpl(Action action)
public String getTitle()
Action
public void setTitle(String title)
Action
public String getDescription()
Action
getDescription
in interface Action
public void setDescription(String description)
Action
setDescription
in interface Action
description
- the description of the actionpublic Boolean getTrackStatus()
getTrackStatus
in interface Action
ActionTrackingService
, false if it must NOT be
tracked or null to use the action definition's default.public void setTrackStatus(Boolean trackStatus)
Action
setTrackStatus
in interface Action
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.public boolean getExecuteAsychronously()
Action
The default is to execute the action synchronously.
getExecuteAsychronously
in interface Action
public void setExecuteAsynchronously(boolean executeAsynchronously)
Action
setExecuteAsynchronously
in interface Action
executeAsynchronously
- true if the action is to be executed asychronously, false otherwise.public Action getCompensatingAction()
Action
This action is executed if the failure behaviour is to compensate and the action being executed fails.
getCompensatingAction
in interface Action
public void setCompensatingAction(Action action)
Action
setCompensatingAction
in interface Action
action
- the compensating actionpublic Date getCreatedDate()
Action
getCreatedDate
in interface Action
public void setCreatedDate(Date createdDate)
createdDate
- the created datepublic String getCreator()
Action
getCreator
in interface Action
public void setCreator(String creator)
public Date getModifiedDate()
Action
getModifiedDate
in interface Action
public void setModifiedDate(Date modifiedDate)
public String getModifier()
Action
getModifier
in interface Action
public void setModifier(String modifier)
public String getActionDefinitionName()
Action
getActionDefinitionName
in interface Action
public boolean hasActionConditions()
Action
hasActionConditions
in interface Action
public int indexOfActionCondition(ActionCondition actionCondition)
Action
indexOfActionCondition
in interface Action
actionCondition
- the action conditionpublic List<ActionCondition> getActionConditions()
Action
getActionConditions
in interface Action
public ActionCondition getActionCondition(int index)
Action
getActionCondition
in interface Action
index
- the indexpublic void addActionCondition(ActionCondition actionCondition)
Action
addActionCondition
in interface Action
actionCondition
- an action conditionpublic void addActionCondition(int index, ActionCondition actionCondition)
Action
addActionCondition
in interface Action
index
- the indexactionCondition
- the action conditionpublic void setActionCondition(int index, ActionCondition actionCondition)
Action
setActionCondition
in interface Action
index
- the indexactionCondition
- the action conditionpublic void removeActionCondition(ActionCondition actionCondition)
Action
removeActionCondition
in interface Action
actionCondition
- an action conditionpublic void removeAllActionConditions()
Action
removeAllActionConditions
in interface Action
public void setActionChain(Set<String> actionChain)
actionChain
- the list of actions that lead to this actionpublic Set<String> getActionChain()
public String getRunAsUser()
public String getTenantId()
public void setRunAsUser(String runAsUserName)
public void setTenantId(String tenantId)
public org.alfresco.service.cmr.repository.NodeRef getNodeRef()
Action
getNodeRef
in interface Action
public void setNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the node referencepublic void addParameterValues(Map<String,Serializable> values)
Action
addParameterValues
in interface Action
values
- A map of values to be addedpublic int getExecutionInstance()
public void setExecutionInstance(int instance)
public Date getExecutionStartDate()
Action
getExecutionStartDate
in interface Action
public void setExecutionStartDate(Date startDate)
ActionService
when
it starts running the action.public Date getExecutionEndDate()
Action
getExecutionEndDate
in interface Action
public void setExecutionEndDate(Date endDate)
ActionService
when
the action completes or fails.public ActionStatus getExecutionStatus()
Action
getExecutionStatus
in interface Action
public void setExecutionStatus(ActionStatus status)
ActionService
as
it progresses the Action's execution.public String getExecutionFailureMessage()
Action
getExecutionFailureMessage
in interface Action
public void setExecutionFailureMessage(String message)
Copyright © 2005–2017 Alfresco Software. All rights reserved.