From a35543d4c456dd61b28e8058b758385586dbaa22 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Fri, 30 Jul 2010 11:12:10 +0000 Subject: [PATCH] Update ReplicationDefinition to hold both local and remote transfer reports, ready for ALF-4126 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21503 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../ReplicationDefinitionImpl.java | 23 ++++++++++++++++--- .../replication/ReplicationDefinition.java | 19 +++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/source/java/org/alfresco/repo/replication/ReplicationDefinitionImpl.java b/source/java/org/alfresco/repo/replication/ReplicationDefinitionImpl.java index d12e8c3a54..c91dae5363 100644 --- a/source/java/org/alfresco/repo/replication/ReplicationDefinitionImpl.java +++ b/source/java/org/alfresco/repo/replication/ReplicationDefinitionImpl.java @@ -44,7 +44,8 @@ public class ReplicationDefinitionImpl extends ActionImpl implements Replication public static final String REPLICATION_DEFINITION_TARGET = "replicationTarget"; public static final String REPLICATION_DEFINITION_PAYLOAD = "replicationPayload"; public static final String REPLICATION_DEFINITION_ENABLED = "replicationDefinitionEnabled"; - public static final String REPLICATION_DEFINITION_TRANSFER_REPORT = "replicationTransferReport"; + public static final String REPLICATION_DEFINITION_LOCAL_TRANSFER_REPORT = "replicationTransferLocalReport"; + public static final String REPLICATION_DEFINITION_REMOTE_TRANSFER_REPORT = "replicationTransferRemoteReport"; /** * @param id @@ -181,7 +182,7 @@ public class ReplicationDefinitionImpl extends ActionImpl implements Replication * org.alfresco.service.cmr.replication.ReplicationDefinition#getLocalTransferReport() */ public NodeRef getLocalTransferReport() { - return (NodeRef)getParameterValue(REPLICATION_DEFINITION_TRANSFER_REPORT); + return (NodeRef)getParameterValue(REPLICATION_DEFINITION_LOCAL_TRANSFER_REPORT); } /* @@ -189,6 +190,22 @@ public class ReplicationDefinitionImpl extends ActionImpl implements Replication * org.alfresco.service.cmr.replication.ReplicationDefinition#setLocalTransferReport(NodeRef) */ public void setLocalTransferReport(NodeRef report) { - setParameterValue(REPLICATION_DEFINITION_TRANSFER_REPORT, report); + setParameterValue(REPLICATION_DEFINITION_LOCAL_TRANSFER_REPORT, report); + } + + /* + * @see + * org.alfresco.service.cmr.replication.ReplicationDefinition#getRemoteTransferReport() + */ + public NodeRef getRemoteTransferReport() { + return (NodeRef)getParameterValue(REPLICATION_DEFINITION_REMOTE_TRANSFER_REPORT); + } + + /* + * @see + * org.alfresco.service.cmr.replication.ReplicationDefinition#setRemoteTransferReport(NodeRef) + */ + public void setRemoteTransferReport(NodeRef report) { + setParameterValue(REPLICATION_DEFINITION_REMOTE_TRANSFER_REPORT, report); } } diff --git a/source/java/org/alfresco/service/cmr/replication/ReplicationDefinition.java b/source/java/org/alfresco/service/cmr/replication/ReplicationDefinition.java index faa2d0b63c..8bbe0cbf1e 100644 --- a/source/java/org/alfresco/service/cmr/replication/ReplicationDefinition.java +++ b/source/java/org/alfresco/service/cmr/replication/ReplicationDefinition.java @@ -95,5 +95,24 @@ public interface ReplicationDefinition extends CancellableAction, Serializable { */ void setLocalTransferReport(NodeRef report); + /** + * 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. + * @return The transfer report on the remote repository + */ + NodeRef getRemoteTransferReport(); + + /** + * Records the location on the local repository + * of the transfer service report that was + * generated on the remote repository for the + * replication. + */ + void setRemoteTransferReport(NodeRef report); + // TODO Replication options, such as permissions and rules }