Replication Service execution work

Now handles locking the replication job, deciding what to replicate for a given payload, and refreshing the lock as the transfer progresses, plus tests. Still needs to call the transfer service though.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20989 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2010-07-07 16:23:34 +00:00
parent 52ce424f4d
commit 9d3ec267b1
4 changed files with 281 additions and 14 deletions

View File

@@ -91,12 +91,24 @@ public class ReplicationDefinitionImpl extends ActionImpl implements Replication
*/
@SuppressWarnings("unchecked")
public List<NodeRef> getPayload() {
List<NodeRef> payload = (List<NodeRef>)
getParameterValue(REPLICATION_DEFINITION_PAYLOAD);
if(payload == null) {
Object payloadO =
getParameterValue(REPLICATION_DEFINITION_PAYLOAD);
List<NodeRef> payload;
if(payloadO == null) {
payload = new ArrayList<NodeRef>();
setParameterValue(REPLICATION_DEFINITION_PAYLOAD, (Serializable)payload);
} else {
// If there's only one entry, comes back as just
// that, unwrapped from the list
if(payloadO instanceof List) {
payload = (List<NodeRef>)payloadO;
} else {
payload = new ArrayList<NodeRef>();
payload.add((NodeRef)payloadO);
}
}
return payload;
}