Merged 2.0 to 2.0.1:

- 39506: RM-467: It's possible to copy folder to the root of the file plan 



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.0-BUG-FIX@39593 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2012-07-23 07:05:07 +00:00

View File

@@ -266,11 +266,16 @@ public class RecordsManagementServiceImpl implements RecordsManagementService,
*/ */
public void onAddContentToContainer(ChildAssociationRef childAssocRef, boolean bNew) public void onAddContentToContainer(ChildAssociationRef childAssocRef, boolean bNew)
{ {
NodeRef parent = childAssocRef.getParentRef();
NodeRef nodeRef = childAssocRef.getChildRef(); NodeRef nodeRef = childAssocRef.getChildRef();
if (instanceOf(nodeRef, ContentModel.TYPE_CONTENT) == true) if (instanceOf(nodeRef, ContentModel.TYPE_CONTENT) == true)
{ {
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_ERROR_ADD_CONTENT_CONTAINER)); throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_ERROR_ADD_CONTENT_CONTAINER));
} }
if (isFilePlan(parent) == true && isRecordFolder(nodeRef) == true)
{
throw new AlfrescoRuntimeException("Operation failed, because you can not place a record folder in the root of the file plan.");
}
} }
/** /**