org.alfresco.repo.action
Class ActionImpl

java.lang.Object
  extended by org.alfresco.repo.action.ParameterizedItemImpl
      extended by org.alfresco.repo.action.ActionImpl
All Implemented Interfaces:
java.io.Serializable, Action, ParameterizedItem
Direct Known Subclasses:
CompositeActionImpl, RenditionDefinitionImpl

public class ActionImpl
extends ParameterizedItemImpl
implements Action

Action implementation

See Also:
Serialized Form

Constructor Summary
ActionImpl(Action action)
           
ActionImpl(Action action, java.lang.String actionDefinitionName)
           
ActionImpl(NodeRef nodeRef, java.lang.String id, java.lang.String actionDefinitionName)
          Constructor
ActionImpl(NodeRef nodeRef, java.lang.String id, java.lang.String actionDefinitionName, java.util.Map parameterValues)
          Constructor
 
Method Summary
 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(java.util.Map values)
          Adds a Map of parameter values to the Action
 java.util.Set getActionChain()
          Get the action chain
 ActionCondition getActionCondition(int index)
          Get the action condition at a given index
 java.util.List getActionConditions()
          Gets a list of the action conditions for this action
 java.lang.String getActionDefinitionName()
          Get the name of the action definition that relates to this action
 Action getCompensatingAction()
          Get the compensating action.
 java.util.Date getCreatedDate()
          Get the date the action was created
 java.lang.String getCreator()
          Get the name of the user that created the action
 java.lang.String getDescription()
          Get the description of the action
 boolean getExecuteAsychronously()
          Gets a value indicating whether the action should be executed asychronously or not.
 java.util.Date getModifiedDate()
          Get the date that the action was last modified
 java.lang.String getModifier()
          Get the name of the user that last modified the action
 NodeRef getNodeRef()
          Gets the node ref that represents the saved action node.
 java.lang.String getRunAsUser()
           
 java.lang.String getTitle()
          Get the title of the action
 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(java.util.Set 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(java.util.Date createdDate)
          Set the created date
 void setCreator(java.lang.String creator)
          Set the creator
 void setDescription(java.lang.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 setModifiedDate(java.util.Date modifiedDate)
          Set the modified date
 void setModifier(java.lang.String modifier)
          Set the modifier
 void setNodeRef(NodeRef nodeRef)
          Set the node reference
 void setRunAsUser(java.lang.String runAsUserName)
           
 void setTitle(java.lang.String title)
          Set the title of the action
 java.lang.String toString()
           
 
Methods inherited from class org.alfresco.repo.action.ParameterizedItemImpl
equals, getId, getParameterValue, getParameterValues, hashCode, setParameterValue, setParameterValues
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.alfresco.service.cmr.action.ParameterizedItem
getId, getParameterValue, getParameterValues, setParameterValue, setParameterValues
 

Constructor Detail

ActionImpl

public ActionImpl(NodeRef nodeRef,
                  java.lang.String id,
                  java.lang.String actionDefinitionName)
Constructor

Parameters:
nodeRef - the action node reference (null if not saved)
id - the action id
actionDefinitionName - the name of the action definition

ActionImpl

public ActionImpl(NodeRef nodeRef,
                  java.lang.String id,
                  java.lang.String actionDefinitionName,
                  java.util.Map parameterValues)
Constructor

Parameters:
nodeRef - the action node reference (null if not saved)
id - the action id
actionDefinitionName - the action definition name
parameterValues - the parameter values

ActionImpl

public ActionImpl(Action action,
                  java.lang.String actionDefinitionName)

ActionImpl

public ActionImpl(Action action)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTitle

public java.lang.String getTitle()
Description copied from interface: Action
Get the title of the action

Specified by:
getTitle in interface Action
Returns:
the title of the action
See Also:
Action.getTitle()

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: Action
Set the title of the action

Specified by:
setTitle in interface Action
Parameters:
title - the title of the action
See Also:
Action.setTitle(java.lang.String)

getDescription

public java.lang.String getDescription()
Description copied from interface: Action
Get the description of the action

Specified by:
getDescription in interface Action
Returns:
the description of the action
See Also:
Action.getDescription()

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: Action
Set the description of the action

Specified by:
setDescription in interface Action
Parameters:
description - the description of the action
See Also:
Action.setDescription(java.lang.String)

getExecuteAsychronously

public boolean getExecuteAsychronously()
Description copied from interface: Action
Gets a value indicating whether the action should be executed asychronously or not.

The default is to execute the action synchronously.

Specified by:
getExecuteAsychronously in interface Action
Returns:
true if the action is executed asychronously, false otherwise.
See Also:
Action.getExecuteAsychronously()

setExecuteAsynchronously

public void setExecuteAsynchronously(boolean executeAsynchronously)
Description copied from interface: Action
Set the value that indicates whether the action should be executed asychronously or not.

Specified by:
setExecuteAsynchronously in interface Action
Parameters:
executeAsynchronously - true if the action is to be executed asychronously, false otherwise.
See Also:
Action.setExecuteAsynchronously(boolean)

getCompensatingAction

public Action getCompensatingAction()
Description copied from interface: Action
Get the compensating action.

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

Specified by:
getCompensatingAction in interface Action
Returns:
the compensating action
See Also:
Action.getCompensatingAction()

setCompensatingAction

public void setCompensatingAction(Action action)
Description copied from interface: Action
Set the compensating action.

Specified by:
setCompensatingAction in interface Action
Parameters:
action - the compensating action
See Also:
Action.setCompensatingAction(org.alfresco.service.cmr.action.Action)

getCreatedDate

public java.util.Date getCreatedDate()
Description copied from interface: Action
Get the date the action was created

Specified by:
getCreatedDate in interface Action
Returns:
action creation date
See Also:
Action.getCreatedDate()

setCreatedDate

public void setCreatedDate(java.util.Date createdDate)
Set the created date

Parameters:
createdDate - the created date

getCreator

public java.lang.String getCreator()
Description copied from interface: Action
Get the name of the user that created the action

Specified by:
getCreator in interface Action
Returns:
user name
See Also:
Action.getCreator()

setCreator

public void setCreator(java.lang.String creator)
Set the creator

Parameters:
creator - the creator

getModifiedDate

public java.util.Date getModifiedDate()
Description copied from interface: Action
Get the date that the action was last modified

Specified by:
getModifiedDate in interface Action
Returns:
aciton modification date
See Also:
Action.getModifiedDate()

setModifiedDate

public void setModifiedDate(java.util.Date modifiedDate)
Set the modified date

Parameters:
modifiedDate - the modified date

getModifier

public java.lang.String getModifier()
Description copied from interface: Action
Get the name of the user that last modified the action

Specified by:
getModifier in interface Action
Returns:
user name
See Also:
Action.getModifier()

setModifier

public void setModifier(java.lang.String modifier)
Set the modifier

Parameters:
modifier - the modifier

getActionDefinitionName

public java.lang.String getActionDefinitionName()
Description copied from interface: Action
Get the name of the action definition that relates to this action

Specified by:
getActionDefinitionName in interface Action
Returns:
the action defintion name
See Also:
Action.getActionDefinitionName()

hasActionConditions

public boolean hasActionConditions()
Description copied from interface: Action
Indicates whether the action has any conditions specified

Specified by:
hasActionConditions in interface Action
Returns:
true if the action has any conditions specified, flase otherwise
See Also:
Action.hasActionConditions()

indexOfActionCondition

public int indexOfActionCondition(ActionCondition actionCondition)
Description copied from interface: Action
Gets the index of an action condition

Specified by:
indexOfActionCondition in interface Action
Parameters:
actionCondition - the action condition
Returns:
the index
See Also:
Action.indexOfActionCondition(org.alfresco.service.cmr.action.ActionCondition)

getActionConditions

public java.util.List getActionConditions()
Description copied from interface: Action
Gets a list of the action conditions for this action

Specified by:
getActionConditions in interface Action
Returns:
list of action conditions
See Also:
Action.getActionConditions()

getActionCondition

public ActionCondition getActionCondition(int index)
Description copied from interface: Action
Get the action condition at a given index

Specified by:
getActionCondition in interface Action
Parameters:
index - the index
Returns:
the action condition
See Also:
Action.getActionCondition(int)

addActionCondition

public void addActionCondition(ActionCondition actionCondition)
Description copied from interface: Action
Add an action condition to the action

Specified by:
addActionCondition in interface Action
Parameters:
actionCondition - an action condition
See Also:
Action.addActionCondition(org.alfresco.service.cmr.action.ActionCondition)

addActionCondition

public void addActionCondition(int index,
                               ActionCondition actionCondition)
Description copied from interface: Action
Add an action condition at the given index

Specified by:
addActionCondition in interface Action
Parameters:
index - the index
actionCondition - the action condition
See Also:
Action.addActionCondition(int, org.alfresco.service.cmr.action.ActionCondition)

setActionCondition

public void setActionCondition(int index,
                               ActionCondition actionCondition)
Description copied from interface: Action
Replaces the current action condition at the given index with the action condition provided.

Specified by:
setActionCondition in interface Action
Parameters:
index - the index
actionCondition - the action condition
See Also:
Action.setActionCondition(int, org.alfresco.service.cmr.action.ActionCondition)

removeActionCondition

public void removeActionCondition(ActionCondition actionCondition)
Description copied from interface: Action
Removes an action condition

Specified by:
removeActionCondition in interface Action
Parameters:
actionCondition - an action condition
See Also:
Action.removeActionCondition(org.alfresco.service.cmr.action.ActionCondition)

removeAllActionConditions

public void removeAllActionConditions()
Description copied from interface: Action
Removes all action conditions

Specified by:
removeAllActionConditions in interface Action
See Also:
Action.removeAllActionConditions()

setActionChain

public void setActionChain(java.util.Set actionChain)
Set the action chain

Parameters:
actionChain - the list of actions that lead to this action

getActionChain

public java.util.Set getActionChain()
Get the action chain

Returns:
the list of actions that lead to this action

getRunAsUser

public java.lang.String getRunAsUser()

setRunAsUser

public void setRunAsUser(java.lang.String runAsUserName)

getNodeRef

public NodeRef getNodeRef()
Description copied from interface: Action
Gets the node ref that represents the saved action node. Returns null id unsaved.

Specified by:
getNodeRef in interface Action
Returns:
the action node reference
See Also:
Action.getNodeRef()

setNodeRef

public void setNodeRef(NodeRef nodeRef)
Set the node reference

Parameters:
nodeRef - the node reference

addParameterValues

public void addParameterValues(java.util.Map values)
Description copied from interface: Action
Adds a Map of parameter values to the Action

Specified by:
addParameterValues in interface Action
Parameters:
values - A map of values to be added


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.