public class ActionServiceImpl extends java.lang.Object implements ActionService, RuntimeActionService, org.springframework.context.ApplicationContextAware, CopyServicePolicies.OnCopyNodePolicy, CopyServicePolicies.OnCopyCompletePolicy
Policy.ArgARG_0, ARG_1, QNAMEQNAME| Constructor and Description |
|---|
ActionServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
Action |
createAction(org.alfresco.service.cmr.repository.NodeRef actionNodeRef)
Create an action from the action node reference
|
Action |
createAction(java.lang.String name)
Create a new action
|
Action |
createAction(java.lang.String name,
java.util.Map params)
Create a new action specifying the initial set of parameter values
|
ActionCondition |
createActionCondition(java.lang.String name)
Create an action condition
|
ActionCondition |
createActionCondition(java.lang.String name,
java.util.Map params)
Create an action condition specifying the initial set of parameter values
|
org.alfresco.service.cmr.repository.NodeRef |
createActionNodeRef(Action action,
org.alfresco.service.cmr.repository.NodeRef parentNodeRef,
org.alfresco.service.namespace.QName assocTypeName,
org.alfresco.service.namespace.QName assocName)
Create a action node reference
|
CompositeAction |
createCompositeAction()
Create a composite action
|
CompositeActionCondition |
createCompositeActionCondition()
Create a composite actionCondition
|
void |
directActionExecution(Action action,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Execute an action directly
|
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)
Evaluates the actions by finding corresponding actionEvaluators in
applicationContext (registered through Spring).
|
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 executeAsychronously)
Executes the specified action upon the node reference provided.
|
void |
executeActionImpl(Action action,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef,
boolean checkConditions,
boolean executedAsynchronously,
java.util.Set actionChain)
Perform low-level action execution
|
Action |
getAction(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.lang.String actionId)
Gets an action stored against a given node reference.
|
ActionConditionDefinition |
getActionConditionDefinition(java.lang.String name)
Get a named action condition definition
|
java.util.List |
getActionConditionDefinitions()
Get all the action condition definitions
|
ActionDefinition |
getActionDefinition(java.lang.String name)
Get a named action definition
|
java.util.List |
getActionDefinitions()
Get all the action definitions
|
java.util.List |
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.
|
java.util.List |
getActions(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets all the actions currently saved on the given node reference.
|
CopyBehaviourCallback |
getCopyCallback(org.alfresco.service.namespace.QName classRef,
CopyDetails copyDetails)
Called for all types and aspects before copying a node.
|
ParameterConstraint |
getParameterConstraint(java.lang.String name)
Get a named parameter constraint
|
java.util.List |
getParameterConstraints()
Get all the parameter constraints
|
void |
init() |
void |
onCopyComplete(org.alfresco.service.namespace.QName classRef,
org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
org.alfresco.service.cmr.repository.NodeRef targetNodeRef,
boolean copyToNewNode,
java.util.Map copyMap)
Ensures that d:noderef properties are repointed if the target was
also copied as part of the hierarchy.
|
void |
populateCompositeAction(org.alfresco.service.cmr.repository.NodeRef compositeNodeRef,
CompositeAction compositeAction)
Populates a composite action from a composite action node reference
|
void |
postCommit()
called by transaction service.
|
void |
registerActionConditionEvaluator(ActionConditionEvaluator actionConditionEvaluator)
Register an action condition evaluator
|
void |
registerActionExecuter(ActionExecuter actionExecuter)
Register an action executer
|
void |
registerParameterConstraint(ParameterConstraint parameterConstraint)
Register parameter constraint
|
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.
|
void |
saveActionImpl(org.alfresco.service.cmr.repository.NodeRef actionNodeRef,
Action action)
Save action, used internally to store the details of an action on the aciton node.
|
void |
setActionTrackingService(ActionTrackingService actionTrackingService)
Set the action tracking service
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Set the application context
|
void |
setAsynchronousActionExecutionQueues(java.util.Map asynchronousActionExecutionQueues)
Set the asynchronous action execution queues
|
void |
setAuthenticationContext(AuthenticationContext authenticationContext)
Set the authentication component
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Set the dictionary service
|
void |
setMonitor(ActionServiceMonitor monitor) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set the node service
|
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Set the search service
|
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareapplicationContext - the application contextorg.springframework.beans.BeansExceptionpublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService - the node servicepublic void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
searchService - the search servicepublic void setAuthenticationContext(AuthenticationContext authenticationContext)
authenticationContext - the authentication componentpublic void setActionTrackingService(ActionTrackingService actionTrackingService)
actionTrackingService - the action tracking servicepublic void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService - the dictionary servicepublic void setPolicyComponent(PolicyComponent policyComponent)
policyComponent - used to set up the action-based policy behaviourpublic void setMonitor(ActionServiceMonitor monitor)
monitor - used to monitor running actions and execution timespublic void setAsynchronousActionExecutionQueues(java.util.Map asynchronousActionExecutionQueues)
asynchronousActionExecutionQueue - the asynchronous action execution
queuespublic void init()
public ActionDefinition getActionDefinition(java.lang.String name)
ActionServicegetActionDefinition in interface ActionServicename - the name of the action definitionActionService.getActionDefinition(java.lang.String)public java.util.List getActionDefinitions()
ActionServicegetActionDefinitions in interface ActionServiceActionService.getActionDefinitions()public java.util.List getActionDefinitions(org.alfresco.service.cmr.repository.NodeRef nodeRef)
ActionServicegetActionDefinitions in interface ActionServicenodeRef - the node referenceActionService.getActionDefinitions(org.alfresco.service.cmr.repository.NodeRef)public ActionConditionDefinition getActionConditionDefinition(java.lang.String name)
ActionServicegetActionConditionDefinition in interface ActionServicename - the name of the action condition definitionActionService.getActionConditionDefinition(java.lang.String)public java.util.List getActionConditionDefinitions()
ActionServicegetActionConditionDefinitions in interface ActionServiceActionService.getActionConditionDefinitions()public ParameterConstraint getParameterConstraint(java.lang.String name)
ActionServicegetParameterConstraint in interface ActionServicename - the name of the parameter constraintActionService.getParameterConstraint(java.lang.String)public java.util.List getParameterConstraints()
ActionServicegetParameterConstraints in interface ActionServiceActionService.getParameterConstraints()public ActionCondition createActionCondition(java.lang.String name)
ActionServicecreateActionCondition in interface ActionServicename - the action condition definition nameActionService.createActionCondition(java.lang.String)public ActionCondition createActionCondition(java.lang.String name, java.util.Map params)
ActionServicecreateActionCondition in interface ActionServicename - the action condition definition nameparams - the parameter valuesActionService.createActionCondition(java.lang.String,
java.util.Map)public Action createAction(java.lang.String name)
ActionServicecreateAction in interface ActionServicename - the action definition nameorg.alfresco.service.cmr.action.ActionService#createAction()public Action createAction(java.lang.String name, java.util.Map params)
ActionServicecreateAction in interface ActionServicename - the action definition nameparams - the parameter valuesActionService.createAction(java.lang.String,
java.util.Map)public CompositeAction createCompositeAction()
ActionServicecreateCompositeAction in interface ActionServiceActionService.createCompositeAction()public CompositeActionCondition createCompositeActionCondition()
ActionServicecreateCompositeActionCondition in interface ActionServiceActionService.createCompositeActionCondition()public boolean evaluateAction(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
ActionServiceReturns true if the action has no conditions.
If the action has more than one condition their results are combined using the 'AND' logical operator.
evaluateAction in interface ActionServiceaction - the actionactionedUponNodeRef - the actioned upon node referenceActionService.evaluateAction(org.alfresco.service.cmr.action.Action,
org.alfresco.service.cmr.repository.NodeRef)public boolean evaluateActionCondition(ActionCondition condition, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
evaluateActionCondition in interface ActionServicecondition - the action conditionactionedUponNodeRef - the actioned upon node referenceActionService.evaluateActionCondition(org.alfresco.service.cmr.action.ActionCondition,
org.alfresco.service.cmr.repository.NodeRef)public void executeAction(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, boolean checkConditions)
ActionServiceexecuteAction in interface ActionServiceaction - the actionactionedUponNodeRef - the actioned upon node referencecheckConditions - indicates whether the conditions should be checkedActionService.executeAction(org.alfresco.service.cmr.action.Action,
org.alfresco.service.cmr.repository.NodeRef, boolean)public void executeAction(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, boolean checkConditions, boolean executeAsychronously)
ActionServiceIf 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.
executeAction in interface ActionServiceaction - the actionactionedUponNodeRef - the actioned upon node referencecheckConditions - indicates whether the conditions should be checked before
executing the actionexecuteAsychronously - indicates whether the action should be executed asychronously or not, this value overrides
the value set on the action its selfActionService.executeAction(org.alfresco.service.cmr.action.Action,
org.alfresco.service.cmr.repository.NodeRef, boolean)public void postCommit()
postCommit in interface RuntimeActionServicepublic void executeActionImpl(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, boolean checkConditions, boolean executedAsynchronously, java.util.Set actionChain)
RuntimeActionServiceexecuteActionImpl in interface RuntimeActionServicepublic void directActionExecution(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
RuntimeActionServicedirectActionExecution in interface RuntimeActionServiceaction - the actionactionedUponNodeRef - the actioned upon node referenceRuntimeActionService.directActionExecution(org.alfresco.service.cmr.action.Action,
org.alfresco.service.cmr.repository.NodeRef)public void executeAction(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
ActionServiceexecuteAction in interface ActionServiceaction - the actionactionedUponNodeRef - the actioned upon node referenceActionService.executeAction(org.alfresco.service.cmr.action.Action,
NodeRef)public void registerActionConditionEvaluator(ActionConditionEvaluator actionConditionEvaluator)
RuntimeActionServiceregisterActionConditionEvaluator in interface RuntimeActionServiceactionConditionEvaluator - action condition evaluatorRuntimeActionService.registerActionConditionEvaluator(org.alfresco.repo.action.evaluator.ActionConditionEvaluator)public void registerActionExecuter(ActionExecuter actionExecuter)
RuntimeActionServiceregisterActionExecuter in interface RuntimeActionServiceactionExecuter - action executerRuntimeActionService.registerActionExecuter(org.alfresco.repo.action.executer.ActionExecuter)public void registerParameterConstraint(ParameterConstraint parameterConstraint)
RuntimeActionServiceregisterParameterConstraint in interface RuntimeActionServiceparameterConstraint - parameter constraintRuntimeActionService.registerParameterConstraint(org.alfresco.service.cmr.action.ParameterConstraint)public void saveAction(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Action action)
ActionServiceThe node will be made configurable if it is not already.
If the action already exists then its details will be updated.
saveAction in interface ActionServicenodeRef - the node referenceaction - the actionActionService.saveAction(org.alfresco.service.cmr.repository.NodeRef,
org.alfresco.service.cmr.action.Action)public org.alfresco.service.cmr.repository.NodeRef createActionNodeRef(Action action, org.alfresco.service.cmr.repository.NodeRef parentNodeRef, org.alfresco.service.namespace.QName assocTypeName, org.alfresco.service.namespace.QName assocName)
RuntimeActionServicecreateActionNodeRef in interface RuntimeActionServiceaction - action objectparentNodeRef - parent node referenceassocTypeName - association type nameassocName - association namepublic void saveActionImpl(org.alfresco.service.cmr.repository.NodeRef actionNodeRef,
Action action)
RuntimeActionServicesaveActionImpl in interface RuntimeActionServiceactionNodeRef - the action node referenceaction - the actionRuntimeActionService.saveActionImpl(org.alfresco.service.cmr.repository.NodeRef,
org.alfresco.service.cmr.action.Action)public java.util.List getActions(org.alfresco.service.cmr.repository.NodeRef nodeRef)
ActionServicegetActions in interface ActionServicenodeRef - the node referenceActionService.getActions(org.alfresco.service.cmr.repository.NodeRef)public Action createAction(org.alfresco.service.cmr.repository.NodeRef actionNodeRef)
createAction in interface RuntimeActionServiceactionNodeRef - the action node referencepublic void populateCompositeAction(org.alfresco.service.cmr.repository.NodeRef compositeNodeRef,
CompositeAction compositeAction)
compositeNodeRef - the composite action node referencecompositeAction - the composite actionpublic Action getAction(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String actionId)
ActionServiceReturns null if the action can not be found.
getAction in interface ActionServicenodeRef - the node referenceactionId - the action idActionService.getAction(org.alfresco.service.cmr.repository.NodeRef,
java.lang.String)public void removeAction(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Action action)
ActionServiceremoveAction in interface ActionServicenodeRef - the node referenceaction - the actionActionService.removeAction(org.alfresco.service.cmr.repository.NodeRef,
org.alfresco.service.cmr.action.Action)public void removeAllActions(org.alfresco.service.cmr.repository.NodeRef nodeRef)
ActionServiceremoveAllActions in interface ActionServicenodeRef - the node referenceActionService.removeAllActions(org.alfresco.service.cmr.repository.NodeRef)public CopyBehaviourCallback getCopyCallback(org.alfresco.service.namespace.QName classRef, CopyDetails copyDetails)
CopyServicePolicies.OnCopyNodePolicygetCopyCallback in interface CopyServicePolicies.OnCopyNodePolicyclassRef - the type or aspect qualified namecopyDetails - the details of the impending copyAdctionParameterTypeCopyBehaviourCallbackCopyServicePoliciespublic void onCopyComplete(org.alfresco.service.namespace.QName classRef,
org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
org.alfresco.service.cmr.repository.NodeRef targetNodeRef,
boolean copyToNewNode,
java.util.Map copyMap)
onCopyComplete in interface CopyServicePolicies.OnCopyCompletePolicyclassRef - the type of the node that was copiedsourceNodeRef - the original nodetargetNodeRef - the destination nodecopyMap - a map containing all the nodes that have been created during the copyCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.