transfer service : first cut of transfer "sync" and unit test.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20941 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2010-07-05 14:18:03 +00:00
parent b59b9604e9
commit 7969f7fca9
9 changed files with 765 additions and 29 deletions

View File

@@ -108,6 +108,26 @@ public class UnitTestTransferManifestNodeFactory implements TransferManifestNode
}
normalNode.setParentAssocs(mappedParentAssocs);
}
/**
* Fiddle with the child assocs
*/
if (newNode instanceof TransferManifestNormalNode)
{
TransferManifestNormalNode normalNode = (TransferManifestNormalNode) newNode;
List<ChildAssociationRef> assocs = normalNode.getChildAssocs();
List<ChildAssociationRef> mappedChildAssocs = new ArrayList<ChildAssociationRef>();
for (ChildAssociationRef assoc : assocs)
{
NodeRef before = assoc.getChildRef();
NodeRef mappedChildNodeRef = mapNodeRef(before);
ChildAssociationRef replace = new ChildAssociationRef(assoc.getTypeQName(), mappedParentNodeRef,
assoc.getQName(), mappedChildNodeRef, assoc.isPrimary(), assoc.getNthSibling());
mappedChildAssocs.add(replace);
}
normalNode.setChildAssocs(mappedChildAssocs);
}
/**
* Fiddle with the UUID property