diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/RmSiteType.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/RmSiteType.java index 4a23e73fc3..9068216fb3 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/RmSiteType.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/RmSiteType.java @@ -306,6 +306,11 @@ public class RmSiteType extends BaseBehaviourBean } /** + * Add the limitation of creating only one rma:filePlan or one dod:filePlan depending on the type of rm site. + * Also added the limitation of crating two cm:folder type under rm site. + * + * Other than this nothing can be created under rm site nodeRef + * * @author Silviu Dinuta * @since 2.6 */ @@ -330,13 +335,19 @@ public class RmSiteType extends BaseBehaviourBean }); } + /** + * Overridden this because in this case we need to have multiple cm:folder types but not more than two of them. + * The two mentioned folders are created when rm site is created and one of them is Saved Searches and the other surf-config folder. + After that creation of cm:folder should not be allowed under rm site node + * + */ @Override protected void validateNewChildAssociation(NodeRef parent, NodeRef child, List acceptedUniqueChildType, List acceptedMultipleChildType) throws InvalidParameterException { super.validateNewChildAssociation(parent, child, acceptedUniqueChildType, acceptedMultipleChildType); - // check the user is not trying to create more than 2 folders that are created by default + // check the user is not trying to create more than 2 folders that are created by default. if(nodeService.getChildAssocs(parent, Sets.newHashSet(ContentModel.TYPE_FOLDER)).size() > 2) { throw new InvalidParameterException("Operation failed. Children of type " + ContentModel.TYPE_FOLDER + " are not allowed"); diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/TransferContainerType.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/TransferContainerType.java index 15a2320bd0..b46fd8c711 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/TransferContainerType.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/TransferContainerType.java @@ -71,7 +71,7 @@ public class TransferContainerType extends BaseBehaviourBean } /** - * On every event + * Prevent creating a node inside transfer container, this will be possible only through internal services in a controlled manner. * * @see org.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy#onCreateChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef, * boolean) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/TransferType.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/TransferType.java index 0e0cd87dc9..268caa0165 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/TransferType.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/TransferType.java @@ -65,6 +65,9 @@ public class TransferType extends BaseBehaviourBean implements NodeServicePolici getBehaviour(BEHAVIOUR_NAME).enable(); } + /** + * Prevent creating a node inside transfer folder, this will be possible only through internal services in a controlled manner. + */ @Override @Behaviour (