Replication Service transfer report tracking

Make the transfer service report available through the replication service, and add unit tests to show that it turns up as expected


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21441 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2010-07-27 15:25:54 +00:00
parent 91aa8759f5
commit 3ffb67e824
2 changed files with 28 additions and 1 deletions

View File

@@ -182,6 +182,9 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
throw new ReplicationServiceException("Unable to execute a disabled replication definition");
}
// Clear the previous transfer report reference
replicationDef.setLocalTransferReport(null);
// Lock the service - only one instance of the replication
// should occur at a time
ReplicationDefinitionLockExtender lock =
@@ -205,11 +208,14 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
buildTransferDefinition(replicationDef, toTransfer);
// Off we go
transferService.transfer(
NodeRef transferReport = transferService.transfer(
replicationDef.getTargetName(),
transferDefinition,
lock
);
// Record the details of the transfer report
replicationDef.setLocalTransferReport(transferReport);
} catch(Exception e) {
if(! (e instanceof TransferCancelledException))
{