Fixes ALF-11964: It's impossible to copy folder that contains a content node and a copy of that content node

- the DoNothingCopyBehaviourCallback now does nothing with peer associations too.
 - added a couple of test cases to cover the problem scenarios

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32791 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Brian Remmington
2011-12-15 16:02:20 +00:00
parent 9983505cbf
commit 80a8a9cf24
2 changed files with 90 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ import java.util.Collections;
import java.util.Map;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
/**
* Simple <i>copy behaviour</i> to prevent any copying.
@@ -73,4 +74,14 @@ public class DoNothingCopyBehaviourCallback extends AbstractCopyBehaviourCallbac
{
return Collections.emptyMap();
}
@Override
public Pair<AssocCopySourceAction, AssocCopyTargetAction> getAssociationCopyAction(QName classQName,
CopyDetails copyDetails, CopyAssociationDetails assocCopyDetails)
{
return new Pair<AssocCopySourceAction, AssocCopyTargetAction>(AssocCopySourceAction.IGNORE,
AssocCopyTargetAction.USE_COPIED_OTHERWISE_ORIGINAL_TARGET);
}
}