From 542775a3cdead40395c9e76614c7987017f84fb3 Mon Sep 17 00:00:00 2001 From: Roy Wetherall Date: Sat, 11 Feb 2006 21:18:04 +0000 Subject: [PATCH] - Prevent the ownable and author aspect from being created. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2350 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/repo/copy/CopyServiceImpl.java | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/source/java/org/alfresco/repo/copy/CopyServiceImpl.java b/source/java/org/alfresco/repo/copy/CopyServiceImpl.java index a26de1a4e3..8cf798d84f 100644 --- a/source/java/org/alfresco/repo/copy/CopyServiceImpl.java +++ b/source/java/org/alfresco/repo/copy/CopyServiceImpl.java @@ -135,7 +135,15 @@ public class CopyServiceImpl implements CopyService this.policyComponent.bindClassBehaviour( QName.createQName(NamespaceService.ALFRESCO_URI, "onCopyNode"), ContentModel.ASPECT_COPIEDFROM, - new JavaBehaviour(this, "copyAspectOnCopy")); + new JavaBehaviour(this, "copyAspectOnCopy")); + this.policyComponent.bindClassBehaviour( + QName.createQName(NamespaceService.ALFRESCO_URI, "onCopyNode"), + ContentModel.ASPECT_OWNABLE, + new JavaBehaviour(this, "onCopyOwnable")); + this.policyComponent.bindClassBehaviour( + QName.createQName(NamespaceService.ALFRESCO_URI, "onCopyNode"), + ContentModel.ASPECT_AUTHOR, + new JavaBehaviour(this, "onCopyAuthor")); this.policyComponent.bindClassBehaviour( QName.createQName(NamespaceService.ALFRESCO_URI, "onCopyComplete"), ContentModel.ASPECT_COPIEDFROM, @@ -752,6 +760,26 @@ public class CopyServiceImpl implements CopyService // Do nothing. This will ensure that copy aspect on the source node does not get copied onto // the destination node. } + + public void onCopyOwnable( + QName classRef, + NodeRef sourceNodeRef, + StoreRef destinationStoreRef, + boolean copyToNewNode, + PolicyScope copyDetails) + { + // Do nothing since the ownable aspect should not be copied + } + + public void onCopyAuthor( + QName classRef, + NodeRef sourceNodeRef, + StoreRef destinationStoreRef, + boolean copyToNewNode, + PolicyScope copyDetails) + { + // Do nothing since the author aspect should not be copied + } public void onCopyComplete( QName classRef,