mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-459: It's possible to move/copy record directly to the category root
* Unable to copy/move record into filePlan root * UI no longer errors if record is present in file plan root, allowing user to fix data git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.0@39403 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -179,18 +179,18 @@ public class RecordsManagementServiceImpl implements RecordsManagementService,
|
||||
public void init()
|
||||
{
|
||||
// Register the association behaviours
|
||||
this.policyComponent.bindAssociationBehaviour(
|
||||
policyComponent.bindAssociationBehaviour(
|
||||
QName.createQName(NamespaceService.ALFRESCO_URI, "onCreateChildAssociation"),
|
||||
TYPE_RECORD_FOLDER,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
new JavaBehaviour(this, "onFileContent", NotificationFrequency.TRANSACTION_COMMIT));
|
||||
|
||||
this.policyComponent.bindAssociationBehaviour(
|
||||
policyComponent.bindAssociationBehaviour(
|
||||
QName.createQName(NamespaceService.ALFRESCO_URI, "onCreateChildAssociation"),
|
||||
TYPE_FILE_PLAN,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
new JavaBehaviour(this, "onAddContentToContainer", NotificationFrequency.EVERY_EVENT));
|
||||
this.policyComponent.bindAssociationBehaviour(
|
||||
policyComponent.bindAssociationBehaviour(
|
||||
QName.createQName(NamespaceService.ALFRESCO_URI, "onCreateChildAssociation"),
|
||||
TYPE_RECORD_CATEGORY,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
@@ -204,7 +204,7 @@ public class RecordsManagementServiceImpl implements RecordsManagementService,
|
||||
);
|
||||
|
||||
// Register script execution behaviour on RM property update.
|
||||
this.policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI, "onUpdateProperties"),
|
||||
policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI, "onUpdateProperties"),
|
||||
ASPECT_FILE_PLAN_COMPONENT,
|
||||
new JavaBehaviour(this, "onChangeToAnyRmProperty", NotificationFrequency.TRANSACTION_COMMIT));
|
||||
|
||||
@@ -266,16 +266,12 @@ public class RecordsManagementServiceImpl implements RecordsManagementService,
|
||||
*/
|
||||
public void onAddContentToContainer(ChildAssociationRef childAssocRef, boolean bNew)
|
||||
{
|
||||
if (childAssocRef.getTypeQName().equals(ContentModel.ASSOC_CONTAINS))
|
||||
{
|
||||
QName childType = nodeService.getType(childAssocRef.getChildRef());
|
||||
|
||||
if(childType.equals(ContentModel.TYPE_CONTENT))
|
||||
NodeRef nodeRef = childAssocRef.getChildRef();
|
||||
if (instanceOf(nodeRef, ContentModel.TYPE_CONTENT) == true)
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_ERROR_ADD_CONTENT_CONTAINER));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure the thumbnails of records are marked as file plan components as are therefore subject to the same
|
||||
|
@@ -47,7 +47,9 @@ public class ClosedCapabilityCondition extends AbstractCapabilityCondition
|
||||
List<ChildAssociationRef> assocs = nodeService.getParentAssocs(nodeRef, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
|
||||
for (ChildAssociationRef assoc : assocs)
|
||||
{
|
||||
if (rmService.isRecordFolderClosed(assoc.getParentRef()) == true)
|
||||
NodeRef parent = assoc.getParentRef();
|
||||
if (rmService.isRecordFolder(parent) == true &&
|
||||
rmService.isRecordFolderClosed(parent) == true)
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user