org.alfresco.repo.action.executer
Class ActionExecuterAbstractBase

java.lang.Object
  extended by org.alfresco.repo.action.CommonResourceAbstractBase
      extended by org.alfresco.repo.action.ParameterizedItemAbstractBase
          extended by org.alfresco.repo.action.executer.ActionExecuterAbstractBase
All Implemented Interfaces:
ActionExecuter, org.springframework.beans.factory.BeanNameAware
Direct Known Subclasses:
AbstractRenderingEngine, ActionServiceImplTest.SleepActionExecuter, AddFailedThumbnailActionExecuter, AddFeaturesActionExecuter, AVMDeployWebsiteAction, AVMRevertListAction, AVMRevertStoreAction, AVMRevertToVersionAction, AVMUndoSandboxListAction, BlogAction, CheckInActionExecuter, CheckOutActionExecuter, CompositeActionExecuter, ContentMetadataExtracter, CopyActionExecuter, CopyToWebProjectActionExecuter, CountChildrenActionExecuter, CounterIncrementActionExecuter, CreateThumbnailActionExecuter, CreateTransferTargetActionExecuter, CreateVersionActionExecuter, DeleteRenditionActionExecuter, ExecuteAllRulesActionExecuter, ExporterActionExecuter, ImporterActionExecuter, LinkCategoryActionExecuter, LinkRules, MailActionExecuter, MoveActionExecuter, PerformRenditionActionExecuter, PublishEventAction, RefreshTagScopeActionExecuter, RemoveFeaturesActionExecuter, ReorderRules, ReplicationActionExecutor, RepositoryExporterActionExecuter, ScriptActionExecuter, SetPropertyValueActionExecuter, SimpleAVMPromoteAction, SimpleAVMSubmitAction, SimpleWorkflowActionExecuter, SpecialiseTypeActionExecuter, StartAVMWorkflowAction, StartWorkflowActionExecuter, TikaPoweredContainerExtractor.ExtractorActionExecutor, TransferAsyncAction, TransferCommitActionExecuter, TransferOneNodeActionExecuter, TransferTreeActionExecuter, TransferTreeWithCancelActionExecuter, TransformActionExecuter, TransitionSimpleWorkflowActionExecuter, UnlinkRules, UpdateTagScopesActionExecuter, UpdateThumbnailActionExecuter, WCMSandboxRevertSnapshotAction, WCMSandboxSubmitAction, WCMSandboxUndoAction

public abstract class ActionExecuterAbstractBase
extends ParameterizedItemAbstractBase
implements ActionExecuter

Rule action executor abstract base.


Field Summary
protected  ActionDefinition actionDefinition
           
protected  java.util.List 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)
 
Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
DISPLAY_LABEL, runtimeActionService
 
Fields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
name
 
Fields inherited from interface org.alfresco.repo.action.executer.ActionExecuter
PARAM_RESULT
 
Constructor Summary
ActionExecuterAbstractBase()
           
 
Method Summary
protected  ActionDefinition createActionDefinition(java.lang.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.
 java.lang.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
 void setApplicableTypes(java.lang.String[] applicableTypes)
          Set the list of types for which this action is applicable
 void setBaseNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setIgnoreLock(boolean ignoreLock)
          Set the ignore lock value.
 void setLockService(LockService lockService)
           
 void setPublicAction(boolean publicAction)
          Set whether the action is public or not.
 void setQueueName(java.lang.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.
 
Methods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
addParameterDefinitions, checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getParamDisplayLabel, getParameterDefintions, getTitleKey, setRuntimeActionService, toString
 
Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

actionDefinition

protected ActionDefinition actionDefinition

publicAction

protected boolean publicAction
Indicated whether the action is public or internal (default true)


applicableTypes

protected java.util.List applicableTypes
List of types and aspects for which this action is applicable

Constructor Detail

ActionExecuterAbstractBase

public ActionExecuterAbstractBase()
Method Detail

init

public void init()
Init method


setLockService

public void setLockService(LockService lockService)

setBaseNodeService

public void setBaseNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)

setPublicAction

public void setPublicAction(boolean publicAction)
Set whether the action is public or not.

Parameters:
publicAction - true if the action is public, false otherwise

getTrackStatus

public boolean getTrackStatus()
Get whether the basic action definition supports action tracking or not. This can be overridden for each action but if not, this value is used. Defaults to false.

Specified by:
getTrackStatus in interface ActionExecuter
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

public void setApplicableTypes(java.lang.String[] applicableTypes)
Set the list of types for which this action is applicable

Parameters:
applicableTypes - arry of applicable types

getIgnoreLock

public boolean getIgnoreLock()
Description copied from interface: ActionExecuter
Indicates 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:
getIgnoreLock in interface ActionExecuter
Returns:
boolean true if ignore lock, false otherwise.
See Also:
ActionExecuter.getIgnoreLock()

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

getActionDefinition

public ActionDefinition getActionDefinition()
Get rule action definition

Specified by:
getActionDefinition in interface ActionExecuter
Returns:
the action definition object

createActionDefinition

protected ActionDefinition createActionDefinition(java.lang.String name)
This method returns an instance of an ActionDefinition implementation class. By default this will be an ActionDefinitionImpl, but this could be overridden.


execute

public void execute(Action action,
                    org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Execute the action executer

Specified by:
execute in interface ActionExecuter
Parameters:
action - the action
actionedUponNodeRef - the actioned upon node reference

executeImpl

protected abstract void executeImpl(Action action,
                                    org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Execute the action implementation

Parameters:
action - the action
actionedUponNodeRef - the actioned upon node

setQueueName

public void setQueueName(java.lang.String queueName)
Set the queueName which will execute this action if blank or null then the action will be executed on the "default" queue

Parameters:
the - name of the execution queue which should execute this action.

getQueueName

public java.lang.String getQueueName()
Description copied from interface: ActionExecuter
Get the queueName that will execute this action

Specified by:
getQueueName in interface ActionExecuter


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