Package org.alfresco.repo.replication
Class ReplicationActionExecutor
- java.lang.Object
-
- org.alfresco.repo.action.CommonResourceAbstractBase
-
- org.alfresco.repo.action.ParameterizedItemAbstractBase
-
- org.alfresco.repo.action.executer.ActionExecuterAbstractBase
-
- org.alfresco.repo.replication.ReplicationActionExecutor
-
- All Implemented Interfaces:
ActionExecuter,LoggingAwareExecuter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
public class ReplicationActionExecutor extends ActionExecuterAbstractBase
- Since:
- 3.4
- Author:
- Nick Burch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classReplicationActionExecutor.ReplicationDefinitionLockExtenderATransferCallbackwhich periodically renews the lock held against aReplicationDefinition
-
Field Summary
-
Fields inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
actionDefinition, applicableTypes, publicAction
-
Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
adhocPropertiesAllowed, 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
Constructors Constructor Description ReplicationActionExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddParameterDefinitions(java.util.List<ParameterDefinition> paramList)Adds the parameter definitions to the listprotected TransferDefinitionbuildTransferDefinition(ReplicationDefinition replicationDef, java.util.Set<org.alfresco.service.cmr.repository.NodeRef> toTransfer)Takes aReplicationDefinitionand a list ofNodeRefs, and returns theTransferDefinitionwhich will allow the replication to be run.protected voidexecuteImpl(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)Execute the action implementationprotected java.util.Set<org.alfresco.service.cmr.repository.NodeRef>expandPayload(ReplicationDefinition replicationDef)Takes aReplicationDefinition, which contains one or more payloadsNodeRefs, and expands them into a full list of nodes to be transfered.booleanonLogException(org.apache.commons.logging.Log logger, java.lang.Throwable t, java.lang.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 actionvoidsetActionTrackingService(ActionTrackingService actionTrackingService)Injects the ActionTrackingService bean.voidsetExcludedAspects(java.lang.String[] excludedAspects)voidsetJobLockService(JobLockService jobLockService)Injects the JobLockService bean.voidsetNodeCrawlerFactory(NodeCrawlerFactory nodeCrawlerFactory)Injects the NodeCrawlerFactory bean.voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)Injects the NodeService bean.voidsetReplicationDefinitionPersister(ReplicationDefinitionPersisterImpl replicationDefinitionPersister)Injects the ReplicationDefinitionPersister bean.voidsetReplicationParams(ReplicationParams replicationParams)Sets Replication ParametersvoidsetTransactionService(TransactionService transactionService)Injects the TransactionService bean.voidsetTransferService(TransferService2 transferService)Injects the TransferService bean.-
Methods inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
createActionDefinition, execute, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, init, isApplicableType, setApplicableTypes, setBaseNodeService, setDictionaryService, setIgnoreLock, setLockService, setMlAwareNodeService, setPublicAction, setQueueName, setTrackStatus
-
Methods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString
-
Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanName
-
-
-
-
Method Detail
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Injects the NodeService bean.- Parameters:
nodeService- the NodeService.
-
setJobLockService
public void setJobLockService(JobLockService jobLockService)
Injects the JobLockService bean.- Parameters:
jobLockService- the JobLockService.
-
setTransferService
public void setTransferService(TransferService2 transferService)
Injects the TransferService bean.- Parameters:
transferService- the TransferService.
-
setNodeCrawlerFactory
public void setNodeCrawlerFactory(NodeCrawlerFactory nodeCrawlerFactory)
Injects the NodeCrawlerFactory bean.- Parameters:
nodeCrawlerFactory- the NodeCrawlerFactory.
-
setActionTrackingService
public void setActionTrackingService(ActionTrackingService actionTrackingService)
Injects the ActionTrackingService bean.- Parameters:
actionTrackingService- the ActionTrackingService.
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
Injects the TransactionService bean.- Parameters:
transactionService- the TransactionService.
-
setReplicationDefinitionPersister
public void setReplicationDefinitionPersister(ReplicationDefinitionPersisterImpl replicationDefinitionPersister)
Injects the ReplicationDefinitionPersister bean.- Parameters:
replicationDefinitionPersister- ReplicationDefinitionPersisterImpl
-
setReplicationParams
public void setReplicationParams(ReplicationParams replicationParams)
Sets Replication Parameters- Parameters:
replicationParams- replication parameters
-
setExcludedAspects
public void setExcludedAspects(java.lang.String[] excludedAspects)
-
addParameterDefinitions
protected void addParameterDefinitions(java.util.List<ParameterDefinition> paramList)
Description copied from class:ParameterizedItemAbstractBaseAdds the parameter definitions to the list- Specified by:
addParameterDefinitionsin classParameterizedItemAbstractBase- Parameters:
paramList- the parameter definitions list
-
expandPayload
protected java.util.Set<org.alfresco.service.cmr.repository.NodeRef> expandPayload(ReplicationDefinition replicationDef)
Takes aReplicationDefinition, which contains one or more payloadsNodeRefs, and expands them into a full list of nodes to be transfered.
-
buildTransferDefinition
protected TransferDefinition buildTransferDefinition(ReplicationDefinition replicationDef, java.util.Set<org.alfresco.service.cmr.repository.NodeRef> toTransfer)
Takes aReplicationDefinitionand a list ofNodeRefs, and returns theTransferDefinitionwhich will allow the replication to be run.
-
executeImpl
protected void executeImpl(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Description copied from class:ActionExecuterAbstractBaseExecute the action implementation- Specified by:
executeImplin classActionExecuterAbstractBase- Parameters:
action- the actionactionedUponNodeRef- the actioned upon node
-
onLogException
public boolean onLogException(org.apache.commons.logging.Log logger, java.lang.Throwable t, java.lang.String message)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- Overrides:
onLogExceptionin classActionExecuterAbstractBase- Parameters:
logger- the loggert- the exception thrownmessage- the proposed message that will be logged- Returns:
- true if it was handled, false for default handling
-
-