Class ActionExecuterAbstractBase
java.lang.Object
org.alfresco.repo.action.CommonResourceAbstractBase
org.alfresco.repo.action.ParameterizedItemAbstractBase
org.alfresco.repo.action.executer.ActionExecuterAbstractBase
- All Implemented Interfaces:
ActionExecuter,LoggingAwareExecuter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
AbstractRenderingEngine,AddFailedThumbnailActionExecuter,AddFeaturesActionExecuter,CancelWorkflowActionExecuter,CheckInActionExecuter,CheckOutActionExecuter,CompositeActionExecuter,ContentMetadataEmbedder,ContentMetadataExtracter,CopyActionExecuter,CountChildrenActionExecuter,CounterIncrementActionExecuter,CreateDownloadArchiveAction,CreateThumbnailActionExecuter,CreateTransferTargetActionExecuter,CreateVersionActionExecuter,DeleteRenditionActionExecuter,ExecuteAllRulesActionExecuter,ExporterActionExecuter,ImporterActionExecuter,LinkCategoryActionExecuter,LinkRules,MailActionExecuter,MoveActionExecuter,PerformRenditionActionExecuter,QuickShareLinkExpiryActionExecutor,RefreshTagScopeActionExecuter,RemoveFeaturesActionExecuter,ReorderRules,ReplicationActionExecutor,RepositoryExporterActionExecuter,ScriptActionExecuter,SetPropertyValueActionExecuter,SimpleWorkflowActionExecuter,SpecialiseTypeActionExecuter,StartWorkflowActionExecuter,TakeOwnershipActionExecuter,TransferAsyncAction,TransferCommitActionExecuter,TransferOneNodeActionExecuter,TransferTreeActionExecuter,TransferTreeWithCancelActionExecuter,TransformActionExecuter,TransitionSimpleWorkflowActionExecuter,UnlinkRules,UpdateTagScopesActionExecuter,UpdateThumbnailActionExecuter
@AlfrescoPublicApi
public abstract class ActionExecuterAbstractBase
extends ParameterizedItemAbstractBase
implements ActionExecuter, LoggingAwareExecuter
Rule action executor abstract base.
- Author:
- Roy Wetherall
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<ActionAccessRestriction>List of action access restrictions (default empty listprotected ActionDefinitionList of types and aspects for which this action is applicableprotected booleanIndicated whether the action is public or internal (default true)Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionServiceFields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
nameFields inherited from interface org.alfresco.repo.action.executer.ActionExecuter
PARAM_RESULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ActionDefinitioncreateActionDefinition(String name) This method returns an instance of an ActionDefinition implementation class.voidExecute the action executerprotected abstract voidexecuteImpl(Action action, NodeRef actionedUponNodeRef) Execute the action implementationGet rule action definitionbooleanIndicates whether a lock on the actioned upon node reference should be ignored or not.Get the queueName that will execute this actionbooleanGet whether the basic action definition supports action tracking or not.voidinit()Init methodprotected booleanisApplicableType(NodeRef actionedUponNodeRef) Check if a node is a type or subtype of the of one of the applicable typesbooleanonLogException(org.apache.commons.logging.Log logger, Throwable t, String message) Optional logging of errors callback for the action executer for the cases when the error might be ignored or shown in a different manner for the actionvoidsetActionAccessRestrictions(List<ActionAccessRestriction> actionAccessRestrictions) Set action access restrictionsvoidsetApplicableTypes(String[] applicableTypes) Set the list of types for which this action is applicablevoidsetBaseNodeService(NodeService nodeService) voidsetDictionaryService(DictionaryService dictionaryService) Set the dictionary servicevoidsetIgnoreLock(boolean ignoreLock) Set the ignore lock value.voidsetLockService(LockService lockService) voidsetMlAwareNodeService(NodeService mlAwareNodeService) voidsetPublicAction(boolean publicAction) Set whether the action is public or not.voidsetQueueName(String queueName) Set the queueName which will execute this action if blank or null then the action will be executed on the "default" queuevoidsetTrackStatus(boolean trackStatus) Set whether the basic action definition requires status tracking.voidverifyActionAccessRestrictions(Action action) Verify action access restrictionsMethods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
addParameterDefinitions, checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toStringMethods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.alfresco.repo.action.executer.ActionExecuter
isExecuteAsynchronously
-
Field Details
-
actionDefinition
-
publicAction
protected boolean publicActionIndicated whether the action is public or internal (default true) -
actionAccessRestrictions
List of action access restrictions (default empty list -
applicableTypes
List of types and aspects for which this action is applicable
-
-
Constructor Details
-
ActionExecuterAbstractBase
public ActionExecuterAbstractBase()
-
-
Method Details
-
init
public void init()Init method -
setMlAwareNodeService
-
setLockService
-
setBaseNodeService
-
setDictionaryService
Set the dictionary service- Parameters:
dictionaryService- the dictionary service
-
setPublicAction
public void setPublicAction(boolean publicAction) Set whether the action is public or not.- Parameters:
publicAction- true if the action is public, false otherwise
-
setActionAccessRestrictions
Set action access restrictions- Parameters:
actionAccessRestrictions-
-
getActionAccessRestrictions
-
getTrackStatus
public boolean getTrackStatus()Get whether the basic action definition supports action tracking or not. This can be overridden for eachactionbut if not, this value is used. Defaults to false.- Specified by:
getTrackStatusin interfaceActionExecuter- Returns:
- true to track action execution status or false (default) to do no action tracking
-
setTrackStatus
public void setTrackStatus(boolean trackStatus) Set whether the basic action definition requires status tracking. This can be overridden on each action instance but if not, it falls back to this definition. Setting this to true introduces performance problems for concurrently-executing rules on V3.4: ALF-7341. It should only be used for long, seldom-run actions.- Parameters:
trackStatus- true to track execution status otherwise false- Since:
- 3.4.1
-
setApplicableTypes
Set the list of types for which this action is applicable- Parameters:
applicableTypes- array of applicable types
-
getIgnoreLock
public boolean getIgnoreLock()Description copied from interface:ActionExecuterIndicates whether a lock on the actioned upon node reference should be ignored or not. If true any lock is ignored and execution continues reguardless, otherwise the lock is checked and the action is not executed (ignored) if the actioned upon node reference is locked in any way. By default locks will be ignored.- Specified by:
getIgnoreLockin interfaceActionExecuter- Returns:
- boolean true if ignore lock, false otherwise.
- See Also:
-
setIgnoreLock
public void setIgnoreLock(boolean ignoreLock) Set the ignore lock value.- Parameters:
ignoreLock- true if lock should be ignored on actioned upon node, false otherwise
-
isApplicableType
Check if a node is a type or subtype of the of one of the applicable types- Parameters:
actionedUponNodeRef- the node to check- Returns:
- Returns true if the node is in the list of
applicable typesor one of the subtypes
-
getActionDefinition
Get rule action definition- Specified by:
getActionDefinitionin interfaceActionExecuter- Returns:
- the action definition object
-
createActionDefinition
This method returns an instance of an ActionDefinition implementation class. By default this will be anActionDefinitionImpl, but this could be overridden. -
execute
Execute the action executer- Specified by:
executein interfaceActionExecuter- Parameters:
action- the actionactionedUponNodeRef- the actioned upon node reference
-
verifyActionAccessRestrictions
Verify action access restrictions- Specified by:
verifyActionAccessRestrictionsin interfaceActionExecuter
-
executeImpl
Execute the action implementation- Parameters:
action- the actionactionedUponNodeRef- the actioned upon node
-
setQueueName
Set the queueName which will execute this action if blank or null then the action will be executed on the "default" queue- Parameters:
queueName- name of the execution queue which should execute this action.
-
getQueueName
Description copied from interface:ActionExecuterGet the queueName that will execute this action- Specified by:
getQueueNamein interfaceActionExecuter
-
onLogException
Description copied from interface:LoggingAwareExecuterOptional logging of errors callback for the action executer for the cases when the error might be ignored or shown in a different manner for the action- Specified by:
onLogExceptionin interfaceLoggingAwareExecuter- Parameters:
logger- the loggert- the exception thrownmessage- the proposed message that will be logged- Returns:
- true if it was handled, false for default handling
-