Package org.alfresco.repo.replication
Class ReplicationDefinitionImpl
- java.lang.Object
-
- org.alfresco.repo.action.ParameterizedItemImpl
-
- org.alfresco.repo.action.ActionImpl
-
- org.alfresco.repo.replication.ReplicationDefinitionImpl
-
- All Implemented Interfaces:
java.io.Serializable,Action,CancellableAction,ParameterizedItem,SchedulableAction,ReplicationDefinition
public class ReplicationDefinitionImpl extends ActionImpl implements ReplicationDefinition
- Since:
- 3.4
- Author:
- Nick Burch
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.service.cmr.action.scheduled.SchedulableAction
SchedulableAction.IntervalPeriod
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEXECUTOR_NAMEstatic java.lang.StringREPLICATION_DEFINITION_ENABLEDstatic java.lang.StringREPLICATION_DEFINITION_LOCAL_TRANSFER_REPORTstatic java.lang.StringREPLICATION_DEFINITION_NAMEstatic java.lang.StringREPLICATION_DEFINITION_PAYLOADstatic java.lang.StringREPLICATION_DEFINITION_REMOTE_TRANSFER_REPORTstatic java.lang.StringREPLICATION_DEFINITION_TARGET
-
Constructor Summary
Constructors Constructor Description ReplicationDefinitionImpl(java.lang.String id, java.lang.String replicationName)ReplicationDefinitionImpl(java.lang.String id, java.lang.String replicationName, java.lang.String description)ReplicationDefinitionImpl(Action action)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.alfresco.service.cmr.repository.NodeRefgetLocalTransferReport()Returns the local side of the report on the transfer.java.util.List<org.alfresco.service.cmr.repository.NodeRef>getPayload()The list of Nodes to be transfered.org.alfresco.service.cmr.repository.NodeRefgetRemoteTransferReport()Returns the remote side of the report on the transfer.java.lang.StringgetReplicationName()org.alfresco.service.namespace.QNamegetReplicationQName()ScheduledPersistedActiongetSchedule()java.lang.IntegergetScheduleIntervalCount()How manySchedulableAction.getScheduleIntervalPeriod()periods should we wait between executions? Will be null if the action isn't scheduled to be repeated.SchedulableAction.IntervalPeriodgetScheduleIntervalPeriod()How long areSchedulableAction.getScheduleIntervalCount()counts measured in?java.util.DategetScheduleStart()Get the first date that the action should be run on or after, or null if it should start shortly after each startup.java.lang.StringgetTargetName()booleanisEnabled()Is this Replication Definition currently enabled (can be run), or disabled (can't be run)?booleanisSchedulingEnabled()Is scheduling currently enabled? SeeReplicationService.enableScheduling(ReplicationDefinition)andReplicationService.disableScheduling(ReplicationDefinition)booleanisTargetExists()Does the target exist?voidsetEnabled(boolean enabled)Enable or Disable the Replication Definition.voidsetLocalTransferReport(org.alfresco.service.cmr.repository.NodeRef report)Records the location on the local repository of the transfer service report on the replication.voidsetRemoteTransferReport(org.alfresco.service.cmr.repository.NodeRef report)Records the location on the local repository of the transfer service report that was generated on the remote repository for the replication.protected voidsetReplicationQName(org.alfresco.service.namespace.QName replicationName)voidsetSchedule(ScheduledPersistedAction schedule)voidsetScheduleIntervalCount(java.lang.Integer count)Sets how many periods should be waited between each execution, or null if it shouldn't be repeated.voidsetScheduleIntervalPeriod(SchedulableAction.IntervalPeriod period)Sets the interval periodvoidsetScheduleStart(java.util.Date startDate)Sets the first date that the action should be run on or after.voidsetTargetExists(boolean targetExists)voidsetTargetName(java.lang.String targetName)Sets the name of the target repository.-
Methods inherited from class org.alfresco.repo.action.ActionImpl
addActionCondition, addActionCondition, addParameterValues, getActionChain, getActionCondition, getActionConditions, getActionDefinitionName, getCompensatingAction, getCreatedDate, getCreator, getDescription, getExecuteAsychronously, getExecutionEndDate, getExecutionFailureMessage, getExecutionInstance, getExecutionStartDate, getExecutionStatus, getModifiedDate, getModifier, getNodeRef, getRunAsUser, getTenantId, getTitle, getTrackStatus, hasActionConditions, indexOfActionCondition, removeActionCondition, removeAllActionConditions, setActionChain, setActionCondition, setCompensatingAction, setCreatedDate, setCreator, setDescription, setExecuteAsynchronously, setExecutionEndDate, setExecutionFailureMessage, setExecutionInstance, setExecutionStartDate, setExecutionStatus, setModifiedDate, setModifier, setNodeRef, setRunAsUser, setTenantId, setTitle, setTrackStatus, toString
-
Methods inherited from class org.alfresco.repo.action.ParameterizedItemImpl
equals, getId, getParameterValue, getParameterValues, hashCode, setParameterValue, setParameterValues
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.alfresco.service.cmr.action.Action
addActionCondition, addActionCondition, addParameterValues, getActionCondition, getActionConditions, getActionDefinitionName, getCompensatingAction, getCreatedDate, getCreator, getDescription, getExecuteAsychronously, getExecutionEndDate, getExecutionFailureMessage, getExecutionStartDate, getExecutionStatus, getModifiedDate, getModifier, getNodeRef, getTitle, getTrackStatus, hasActionConditions, indexOfActionCondition, removeActionCondition, removeAllActionConditions, setActionCondition, setCompensatingAction, setDescription, setExecuteAsynchronously, setTitle, setTrackStatus
-
Methods inherited from interface org.alfresco.service.cmr.action.ParameterizedItem
getId, getParameterValue, getParameterValues, setParameterValue, setParameterValues
-
-
-
-
Field Detail
-
EXECUTOR_NAME
public static final java.lang.String EXECUTOR_NAME
- See Also:
- Constant Field Values
-
REPLICATION_DEFINITION_NAME
public static final java.lang.String REPLICATION_DEFINITION_NAME
- See Also:
- Constant Field Values
-
REPLICATION_DEFINITION_TARGET
public static final java.lang.String REPLICATION_DEFINITION_TARGET
- See Also:
- Constant Field Values
-
REPLICATION_DEFINITION_PAYLOAD
public static final java.lang.String REPLICATION_DEFINITION_PAYLOAD
- See Also:
- Constant Field Values
-
REPLICATION_DEFINITION_ENABLED
public static final java.lang.String REPLICATION_DEFINITION_ENABLED
- See Also:
- Constant Field Values
-
REPLICATION_DEFINITION_LOCAL_TRANSFER_REPORT
public static final java.lang.String REPLICATION_DEFINITION_LOCAL_TRANSFER_REPORT
- See Also:
- Constant Field Values
-
REPLICATION_DEFINITION_REMOTE_TRANSFER_REPORT
public static final java.lang.String REPLICATION_DEFINITION_REMOTE_TRANSFER_REPORT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ReplicationDefinitionImpl
public ReplicationDefinitionImpl(java.lang.String id, java.lang.String replicationName)- Parameters:
id- the action idreplicationName- a unique name for the replication action.
-
ReplicationDefinitionImpl
public ReplicationDefinitionImpl(java.lang.String id, java.lang.String replicationName, java.lang.String description)- Parameters:
id- the action idreplicationName- a unique name for the replication action.description- a description of the replication
-
ReplicationDefinitionImpl
public ReplicationDefinitionImpl(Action action)
-
-
Method Detail
-
getReplicationName
public java.lang.String getReplicationName()
- Specified by:
getReplicationNamein interfaceReplicationDefinition- Returns:
- the name which uniquely identifies this replication definition.
-
getReplicationQName
public org.alfresco.service.namespace.QName getReplicationQName()
- Specified by:
getReplicationQNamein interfaceReplicationDefinition- Returns:
- the qualified name which uniquely identifies this replication definition.
-
setReplicationQName
protected void setReplicationQName(org.alfresco.service.namespace.QName replicationName)
-
isEnabled
public boolean isEnabled()
Description copied from interface:ReplicationDefinitionIs this Replication Definition currently enabled (can be run), or disabled (can't be run)?- Specified by:
isEnabledin interfaceReplicationDefinition- Returns:
- Whether the definition is enabled or not
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from interface:ReplicationDefinitionEnable or Disable the Replication Definition.- Specified by:
setEnabledin interfaceReplicationDefinition
-
getPayload
public java.util.List<org.alfresco.service.cmr.repository.NodeRef> getPayload()
Description copied from interface:ReplicationDefinitionThe list of Nodes to be transfered. This list can be edited as required.- Specified by:
getPayloadin interfaceReplicationDefinition- Returns:
- An editable list of the nodes to be transfered
-
getTargetName
public java.lang.String getTargetName()
- Specified by:
getTargetNamein interfaceReplicationDefinition- Returns:
- the name of the target repository.
-
setTargetName
public void setTargetName(java.lang.String targetName)
Description copied from interface:ReplicationDefinitionSets the name of the target repository.- Specified by:
setTargetNamein interfaceReplicationDefinition
-
getLocalTransferReport
public org.alfresco.service.cmr.repository.NodeRef getLocalTransferReport()
Description copied from interface:ReplicationDefinitionReturns the local side of the report on the transfer. The transfer service generates two reports, one on the local repository, and one on the remote repository. This returns the local version of the report.- Specified by:
getLocalTransferReportin interfaceReplicationDefinition- Returns:
- The transfer report on the local repository
-
setLocalTransferReport
public void setLocalTransferReport(org.alfresco.service.cmr.repository.NodeRef report)
Description copied from interface:ReplicationDefinitionRecords the location on the local repository of the transfer service report on the replication.- Specified by:
setLocalTransferReportin interfaceReplicationDefinition
-
getRemoteTransferReport
public org.alfresco.service.cmr.repository.NodeRef getRemoteTransferReport()
Description copied from interface:ReplicationDefinitionReturns the remote side of the report on the transfer. The transfer service generates two reports, one on the local repository, and one on the remote repository. This returns the remote version of the report.- Specified by:
getRemoteTransferReportin interfaceReplicationDefinition- Returns:
- The transfer report on the remote repository
-
setRemoteTransferReport
public void setRemoteTransferReport(org.alfresco.service.cmr.repository.NodeRef report)
Description copied from interface:ReplicationDefinitionRecords the location on the local repository of the transfer service report that was generated on the remote repository for the replication.- Specified by:
setRemoteTransferReportin interfaceReplicationDefinition
-
getSchedule
public ScheduledPersistedAction getSchedule()
-
setSchedule
public void setSchedule(ScheduledPersistedAction schedule)
-
getScheduleIntervalCount
public java.lang.Integer getScheduleIntervalCount()
Description copied from interface:SchedulableActionHow manySchedulableAction.getScheduleIntervalPeriod()periods should we wait between executions? Will be null if the action isn't scheduled to be repeated.- Specified by:
getScheduleIntervalCountin interfaceSchedulableAction
-
getScheduleIntervalPeriod
public SchedulableAction.IntervalPeriod getScheduleIntervalPeriod()
Description copied from interface:SchedulableActionHow long areSchedulableAction.getScheduleIntervalCount()counts measured in?- Specified by:
getScheduleIntervalPeriodin interfaceSchedulableAction
-
getScheduleStart
public java.util.Date getScheduleStart()
Description copied from interface:SchedulableActionGet the first date that the action should be run on or after, or null if it should start shortly after each startup.- Specified by:
getScheduleStartin interfaceSchedulableAction
-
setScheduleIntervalCount
public void setScheduleIntervalCount(java.lang.Integer count)
Description copied from interface:SchedulableActionSets how many periods should be waited between each execution, or null if it shouldn't be repeated.- Specified by:
setScheduleIntervalCountin interfaceSchedulableAction
-
setScheduleIntervalPeriod
public void setScheduleIntervalPeriod(SchedulableAction.IntervalPeriod period)
Description copied from interface:SchedulableActionSets the interval period- Specified by:
setScheduleIntervalPeriodin interfaceSchedulableAction
-
setScheduleStart
public void setScheduleStart(java.util.Date startDate)
Description copied from interface:SchedulableActionSets the first date that the action should be run on or after. Set to null if the action should be run shortly after each startup.- Specified by:
setScheduleStartin interfaceSchedulableAction
-
isSchedulingEnabled
public boolean isSchedulingEnabled()
Description copied from interface:ReplicationDefinitionIs scheduling currently enabled? SeeReplicationService.enableScheduling(ReplicationDefinition)andReplicationService.disableScheduling(ReplicationDefinition)- Specified by:
isSchedulingEnabledin interfaceReplicationDefinition
-
isTargetExists
public boolean isTargetExists()
Description copied from interface:ReplicationDefinitionDoes the target exist?- Specified by:
isTargetExistsin interfaceReplicationDefinition- Returns:
- true it does
-
setTargetExists
public void setTargetExists(boolean targetExists)
-
-