org.alfresco.repo.replication
Class ReplicationDefinitionImpl

java.lang.Object
  extended by org.alfresco.repo.action.ParameterizedItemImpl
      extended by org.alfresco.repo.action.ActionImpl
          extended by 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
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.service.cmr.action.scheduled.SchedulableAction
SchedulableAction.IntervalPeriod
 
Field Summary
static java.lang.String EXECUTOR_NAME
           
static java.lang.String REPLICATION_DEFINITION_ENABLED
           
static java.lang.String REPLICATION_DEFINITION_LOCAL_TRANSFER_REPORT
           
static java.lang.String REPLICATION_DEFINITION_NAME
           
static java.lang.String REPLICATION_DEFINITION_PAYLOAD
           
static java.lang.String REPLICATION_DEFINITION_REMOTE_TRANSFER_REPORT
           
static java.lang.String REPLICATION_DEFINITION_TARGET
           
 
Constructor Summary
ReplicationDefinitionImpl(Action action)
           
ReplicationDefinitionImpl(java.lang.String id, java.lang.String replicationName)
           
ReplicationDefinitionImpl(java.lang.String id, java.lang.String replicationName, java.lang.String description)
           
 
Method Summary
 org.alfresco.service.cmr.repository.NodeRef getLocalTransferReport()
          Returns the local side of the report on the transfer.
 java.util.List getPayload()
          The list of Nodes to be transfered.
 org.alfresco.service.cmr.repository.NodeRef getRemoteTransferReport()
          Returns the remote side of the report on the transfer.
 java.lang.String getReplicationName()
           
 org.alfresco.service.namespace.QName getReplicationQName()
           
 ScheduledPersistedAction getSchedule()
           
 java.lang.Integer getScheduleIntervalCount()
          How many SchedulableAction.getScheduleIntervalPeriod() periods should we wait between executions? Will be null if the action isn't scheduled to be repeated.
 SchedulableAction.IntervalPeriod getScheduleIntervalPeriod()
          How long are SchedulableAction.getScheduleIntervalCount() counts measured in?
 java.util.Date getScheduleStart()
          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.String getTargetName()
           
 boolean isEnabled()
          Is this Replication Definition currently enabled (can be run), or disabled (can't be run)?
 boolean isSchedulingEnabled()
          Is scheduling currently enabled? See ReplicationService.enableScheduling(ReplicationDefinition) and ReplicationService.disableScheduling(ReplicationDefinition)
 void setEnabled(boolean enabled)
          Enable or Disable the Replication Definition.
 void setLocalTransferReport(org.alfresco.service.cmr.repository.NodeRef report)
          Records the location on the local repository of the transfer service report on the replication.
 void setRemoteTransferReport(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  void setReplicationQName(org.alfresco.service.namespace.QName replicationName)
           
 void setSchedule(ScheduledPersistedAction schedule)
           
 void setScheduleIntervalCount(java.lang.Integer count)
          Sets how many periods should be waited between each execution, or null if it shouldn't be repeated.
 void setScheduleIntervalPeriod(SchedulableAction.IntervalPeriod period)
          Sets the interval period
 void setScheduleStart(java.util.Date startDate)
          Sets the first date that the action should be run on or after.
 void setTargetName(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, getTitle, getTrackStatus, hasActionConditions, indexOfActionCondition, removeActionCondition, removeAllActionConditions, setActionChain, setActionCondition, setCompensatingAction, setCreatedDate, setCreator, setDescription, setExecuteAsynchronously, setExecutionEndDate, setExecutionFailureMessage, setExecutionInstance, setExecutionStartDate, setExecutionStatus, setModifiedDate, setModifier, setNodeRef, setRunAsUser, 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 id
replicationName - 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 id
replicationName - 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:
getReplicationName in interface ReplicationDefinition
Returns:
the name which uniquely identifies this replication definition.

getReplicationQName

public org.alfresco.service.namespace.QName getReplicationQName()
Specified by:
getReplicationQName in interface ReplicationDefinition
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: ReplicationDefinition
Is this Replication Definition currently enabled (can be run), or disabled (can't be run)?

Specified by:
isEnabled in interface ReplicationDefinition
Returns:
Whether the definition is enabled or not

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: ReplicationDefinition
Enable or Disable the Replication Definition.

Specified by:
setEnabled in interface ReplicationDefinition

getPayload

public java.util.List getPayload()
Description copied from interface: ReplicationDefinition
The list of Nodes to be transfered. This list can be edited as required.

Specified by:
getPayload in interface ReplicationDefinition
Returns:
An editable list of the nodes to be transfered

getTargetName

public java.lang.String getTargetName()
Specified by:
getTargetName in interface ReplicationDefinition
Returns:
the name of the target repository.

setTargetName

public void setTargetName(java.lang.String targetName)
Description copied from interface: ReplicationDefinition
Sets the name of the target repository.

Specified by:
setTargetName in interface ReplicationDefinition

getLocalTransferReport

public org.alfresco.service.cmr.repository.NodeRef getLocalTransferReport()
Description copied from interface: ReplicationDefinition
Returns 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:
getLocalTransferReport in interface ReplicationDefinition
Returns:
The transfer report on the local repository

setLocalTransferReport

public void setLocalTransferReport(org.alfresco.service.cmr.repository.NodeRef report)
Description copied from interface: ReplicationDefinition
Records the location on the local repository of the transfer service report on the replication.

Specified by:
setLocalTransferReport in interface ReplicationDefinition

getRemoteTransferReport

public org.alfresco.service.cmr.repository.NodeRef getRemoteTransferReport()
Description copied from interface: ReplicationDefinition
Returns 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:
getRemoteTransferReport in interface ReplicationDefinition
Returns:
The transfer report on the remote repository

setRemoteTransferReport

public void setRemoteTransferReport(org.alfresco.service.cmr.repository.NodeRef report)
Description copied from interface: ReplicationDefinition
Records the location on the local repository of the transfer service report that was generated on the remote repository for the replication.

Specified by:
setRemoteTransferReport in interface ReplicationDefinition

getSchedule

public ScheduledPersistedAction getSchedule()

setSchedule

public void setSchedule(ScheduledPersistedAction schedule)

getScheduleIntervalCount

public java.lang.Integer getScheduleIntervalCount()
Description copied from interface: SchedulableAction
How many SchedulableAction.getScheduleIntervalPeriod() periods should we wait between executions? Will be null if the action isn't scheduled to be repeated.

Specified by:
getScheduleIntervalCount in interface SchedulableAction

getScheduleIntervalPeriod

public SchedulableAction.IntervalPeriod getScheduleIntervalPeriod()
Description copied from interface: SchedulableAction
How long are SchedulableAction.getScheduleIntervalCount() counts measured in?

Specified by:
getScheduleIntervalPeriod in interface SchedulableAction

getScheduleStart

public java.util.Date getScheduleStart()
Description copied from interface: SchedulableAction
Get the first date that the action should be run on or after, or null if it should start shortly after each startup.

Specified by:
getScheduleStart in interface SchedulableAction

setScheduleIntervalCount

public void setScheduleIntervalCount(java.lang.Integer count)
Description copied from interface: SchedulableAction
Sets how many periods should be waited between each execution, or null if it shouldn't be repeated.

Specified by:
setScheduleIntervalCount in interface SchedulableAction

setScheduleIntervalPeriod

public void setScheduleIntervalPeriod(SchedulableAction.IntervalPeriod period)
Description copied from interface: SchedulableAction
Sets the interval period

Specified by:
setScheduleIntervalPeriod in interface SchedulableAction

setScheduleStart

public void setScheduleStart(java.util.Date startDate)
Description copied from interface: SchedulableAction
Sets 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:
setScheduleStart in interface SchedulableAction

isSchedulingEnabled

public boolean isSchedulingEnabled()
Description copied from interface: ReplicationDefinition
Is scheduling currently enabled? See ReplicationService.enableScheduling(ReplicationDefinition) and ReplicationService.disableScheduling(ReplicationDefinition)

Specified by:
isSchedulingEnabled in interface ReplicationDefinition


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