@AlfrescoPublicApi public abstract class ActionExecuterAbstractBase extends ParameterizedItemAbstractBase implements ActionExecuter, LoggingAwareExecuter
Modifier and Type | Field and Description |
---|---|
protected ActionDefinition |
actionDefinition |
protected Set<org.alfresco.service.namespace.QName> |
applicableTypes
List of types and aspects for which this action is applicable
|
protected boolean |
publicAction
Indicated whether the action is public or internal (default true)
|
adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionService
name
PARAM_RESULT
Constructor and Description |
---|
ActionExecuterAbstractBase() |
Modifier and Type | Method and Description |
---|---|
protected ActionDefinition |
createActionDefinition(String name)
This method returns an instance of an ActionDefinition implementation class.
|
void |
execute(Action action,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Execute the action executer
|
protected abstract void |
executeImpl(Action action,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Execute the action implementation
|
ActionDefinition |
getActionDefinition()
Get rule action definition
|
boolean |
getIgnoreLock()
Indicates whether a lock on the actioned upon node reference should be ignored or
not.
|
String |
getQueueName()
Get the queueName that will execute this action
|
boolean |
getTrackStatus()
Get whether the basic action definition supports action tracking
or not.
|
void |
init()
Init method
|
protected boolean |
isApplicableType(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Check if a node is a type or subtype of the of one of the applicable types
|
boolean |
onLogException(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 action
|
void |
setApplicableTypes(String[] applicableTypes)
Set the list of types for which this action is applicable
|
void |
setBaseNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Set the dictionary service
|
void |
setIgnoreLock(boolean ignoreLock)
Set the ignore lock value.
|
void |
setLockService(LockService lockService) |
void |
setMlAwareNodeService(org.alfresco.service.cmr.repository.NodeService mlAwareNodeService) |
void |
setPublicAction(boolean publicAction)
Set whether the action is public or not.
|
void |
setQueueName(String queueName)
Set the queueName which will execute this action
if blank or null then the action will be executed on the "default" queue
|
void |
setTrackStatus(boolean trackStatus)
Set whether the basic action definition requires status tracking.
|
addParameterDefinitions, checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString
setBeanName
protected ActionDefinition actionDefinition
protected boolean publicAction
protected Set<org.alfresco.service.namespace.QName> applicableTypes
public void init()
public void setMlAwareNodeService(org.alfresco.service.cmr.repository.NodeService mlAwareNodeService)
public void setLockService(LockService lockService)
public void setBaseNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService
- the dictionary servicepublic void setPublicAction(boolean publicAction)
publicAction
- true if the action is public, false otherwisepublic boolean getTrackStatus()
action
but if not, this value is used. Defaults to false.getTrackStatus
in interface ActionExecuter
public void setTrackStatus(boolean trackStatus)
trackStatus
- true to track execution status otherwise falsepublic void setApplicableTypes(String[] applicableTypes)
applicableTypes
- array of applicable typespublic boolean getIgnoreLock()
ActionExecuter
getIgnoreLock
in interface ActionExecuter
ActionExecuter.getIgnoreLock()
public void setIgnoreLock(boolean ignoreLock)
ignoreLock
- true if lock should be ignored on actioned upon node, false otherwiseprotected boolean isApplicableType(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
actionedUponNodeRef
- the node to checkapplicable types
or one of the
subtypespublic ActionDefinition getActionDefinition()
getActionDefinition
in interface ActionExecuter
protected ActionDefinition createActionDefinition(String name)
ActionDefinitionImpl
, but this could be overridden.public void execute(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
execute
in interface ActionExecuter
action
- the actionactionedUponNodeRef
- the actioned upon node referenceprotected abstract void executeImpl(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
action
- the actionactionedUponNodeRef
- the actioned upon nodepublic void setQueueName(String queueName)
queueName
- name of the execution queue which should execute this action.public String getQueueName()
ActionExecuter
getQueueName
in interface ActionExecuter
public boolean onLogException(org.apache.commons.logging.Log logger, Throwable t, String message)
LoggingAwareExecuter
onLogException
in interface LoggingAwareExecuter
logger
- the loggert
- the exception thrownmessage
- the proposed message that will be loggedCopyright © 2005–2017 Alfresco Software. All rights reserved.