@AlfrescoPublicApi
public interface ActionService
Modifier and Type | Method and Description |
---|---|
Action |
createAction(String name)
Create a new action
|
Action |
createAction(String name,
Map<String,Serializable> params)
Create a new action specifying the initial set of parameter values
|
ActionCondition |
createActionCondition(String name)
Create an action condition
|
ActionCondition |
createActionCondition(String name,
Map<String,Serializable> params)
Create an action condition specifying the initial set of parameter values
|
CompositeAction |
createCompositeAction()
Create a composite action
|
CompositeActionCondition |
createCompositeActionCondition()
Create a composite actionCondition
|
boolean |
evaluateAction(Action action,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Evaluted the conditions set on an action.
|
boolean |
evaluateActionCondition(ActionCondition condition,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Evaluate an action condition.
|
void |
executeAction(Action action,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
The actions conditions are always checked.
|
void |
executeAction(Action action,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef,
boolean checkConditions)
The action is executed based on the asynchronous attribute of the action.
|
void |
executeAction(Action action,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef,
boolean checkConditions,
boolean executeAsynchronously)
Executes the specified action upon the node reference provided.
|
Action |
getAction(org.alfresco.service.cmr.repository.NodeRef nodeRef,
String actionId)
Gets an action stored against a given node reference.
|
ActionConditionDefinition |
getActionConditionDefinition(String name)
Get a named action condition definition
|
List<ActionConditionDefinition> |
getActionConditionDefinitions()
Get all the action condition definitions
|
ActionDefinition |
getActionDefinition(String name)
Get a named action definition
|
List<ActionDefinition> |
getActionDefinitions()
Get all the action definitions
|
List<ActionDefinition> |
getActionDefinitions(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Get all the action definitions that are applicable for the given node, based on
its type and aspects.
|
List<Action> |
getActions(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets all the actions currently saved on the given node reference.
|
ParameterConstraint |
getParameterConstraint(String name)
Get a named parameter constraint
|
List<ParameterConstraint> |
getParameterConstraints()
Get all the parameter constraints
|
void |
removeAction(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Action action)
Removes an action associated with a node reference.
|
void |
removeAllActions(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Removes all actions associated with a node reference
|
void |
saveAction(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Action action)
Save an action against a node reference.
|
@Auditable(parameters="name") ActionDefinition getActionDefinition(String name)
name
- the name of the action definition@Auditable List<ActionDefinition> getActionDefinitions()
@Auditable(parameters="nodeRef") List<ActionDefinition> getActionDefinitions(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the node reference@Auditable(parameters="name") ActionConditionDefinition getActionConditionDefinition(String name)
name
- the name of the action condition definition@Auditable(parameters={}) List<ActionConditionDefinition> getActionConditionDefinitions()
@Auditable(parameters="name") ParameterConstraint getParameterConstraint(String name)
name
- the name of the parameter constraint@Auditable(parameters={}) List<ParameterConstraint> getParameterConstraints()
@Auditable(parameters="name") Action createAction(String name)
name
- the action definition name@Auditable(parameters={"name","params"}) Action createAction(String name, Map<String,Serializable> params)
name
- the action definition nameparams
- the parameter values@Auditable CompositeAction createCompositeAction()
@Auditable(parameters="name") ActionCondition createActionCondition(String name)
name
- the action condition definition name@Auditable(parameters={"name","params"}) ActionCondition createActionCondition(String name, Map<String,Serializable> params)
name
- the action condition definition nameparams
- the parameter values@Auditable CompositeActionCondition createCompositeActionCondition()
@Auditable(parameters={"action","actionedUponNodeRef"}) void executeAction(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
action
- the actionactionedUponNodeRef
- the actioned upon node referenceexecuteAction(Action, NodeRef, boolean)
@Auditable(parameters={"action","actionedUponNodeRef","checkConditions"}) void executeAction(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, boolean checkConditions)
action
- the actionactionedUponNodeRef
- the actioned upon node referencecheckConditions
- indicates whether the conditions should be checkedexecuteAction(Action, NodeRef, boolean, boolean)
@Auditable(parameters={"action","actionedUponNodeRef","checkConditions","executeAsynchronously"}) void executeAction(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, boolean checkConditions, boolean executeAsynchronously)
If specified that the conditions should be checked then any conditions set on the action are evaluated.
If the conditions fail then the action is not executed.
If an action has no conditions then the action will always be executed.
If the conditions are not checked then the action will always be executed.
action
- the actionactionedUponNodeRef
- the actioned upon node referencecheckConditions
- indicates whether the conditions should be checked before
executing the actionexecuteAsynchronously
- indicates whether the action should be executed asychronously or not, this value overrides
the value set on the action its self@Auditable(parameters={"action","actionedUponNodeRef"}) boolean evaluateAction(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Returns true if the action has no conditions.
If the action has more than one condition their results are combined using the 'AND' logical operator.
action
- the actionactionedUponNodeRef
- the actioned upon node reference@Auditable(parameters={"condition","actionedUponNodeRef"}) boolean evaluateActionCondition(ActionCondition condition, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
condition
- the action conditionactionedUponNodeRef
- the actioned upon node reference@Auditable(parameters={"nodeRef","action"}) void saveAction(org.alfresco.service.cmr.repository.NodeRef nodeRef, Action action)
The node will be made configurable if it is not already.
If the action already exists then its details will be updated.
nodeRef
- the node referenceaction
- the action@Auditable(parameters="nodeRef") List<Action> getActions(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the node reference@Auditable(parameters={"nodeRef","actionId"}) Action getAction(org.alfresco.service.cmr.repository.NodeRef nodeRef, String actionId)
Returns null if the action can not be found.
nodeRef
- the node referenceactionId
- the action id@Auditable(parameters={"nodeRef","action"}) void removeAction(org.alfresco.service.cmr.repository.NodeRef nodeRef, Action action)
nodeRef
- the node referenceaction
- the action@Auditable(parameters="nodeRef") void removeAllActions(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the node referenceCopyright © 2005–2017 Alfresco Software. All rights reserved.