svn merge -r 2570:2595 svn://www.alfresco.org/alfresco/BRANCHES/V1.2.0/root HEAD/root

svn merge -r 2597:2649 svn://www.alfresco.org/alfresco/BRANCHES/V1.2.0/root HEAD/root


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2650 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-04-12 14:58:21 +00:00
parent c3adde8ac4
commit 776314da72
17 changed files with 469 additions and 63 deletions

View File

@@ -607,9 +607,23 @@ public class CopyServiceImpl implements CopyService
{
for (AssociationRef assocRef : nodeAssocRefs)
{
// Add the association
NodeRef targetRef = assocRef.getTargetRef();
this.nodeService.createAssociation(destinationNodeRef, targetRef, assocRef.getTypeQName());
boolean exists = false;
for (AssociationRef assocRef2 : this.nodeService.getTargetAssocs(destinationNodeRef, assocRef.getTypeQName()))
{
if (targetRef.equals(assocRef2.getTargetRef()) == true)
{
exists = true;
break;
}
}
if (exists == false)
{
// Add the association
this.nodeService.createAssociation(destinationNodeRef, targetRef, assocRef.getTypeQName());
}
}
}
}