From b055176b14dc8dba56b1e6c442d632b06fd7dde4 Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Wed, 1 Mar 2017 20:46:22 +0200 Subject: [PATCH] Revert "RM-4619 - add the rm search aspect when a record folder is created via conversion" This reverts commit 92b9f4df4a49ba49f3acc11f608f5822636b6ca9. --- .../RecordsManagementSearchBehaviour.java | 29 ------------------- .../test/integration/issue/RM4619Test.java | 2 -- 2 files changed, 31 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java index 6835ce016e..ac3ad58ad1 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java @@ -234,11 +234,6 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel TYPE_RECORD_FOLDER, new JavaBehaviour(this, "recordFolderCreate", NotificationFrequency.TRANSACTION_COMMIT)); - this.policyComponent.bindClassBehaviour( - QName.createQName(NamespaceService.ALFRESCO_URI, "onSetNodeType"), - TYPE_RECORD_FOLDER, - new JavaBehaviour(this, "convertedToOrFromRecordFolder", NotificationFrequency.TRANSACTION_COMMIT)); - // Vital Records Review Details Rollup this.policyComponent.bindClassBehaviour( QName.createQName(NamespaceService.ALFRESCO_URI, "onAddAspect"), @@ -433,30 +428,6 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel }); } - /** - * On update type to or from record folder behaviour implementation - * @param nodeRef the updated node - * @param oldType the type the node had before update - * @param newType the type the node has after update - */ - public void convertedToOrFromRecordFolder(final NodeRef nodeRef, final QName oldType, final QName newType) - { - AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork() - { - @Override - public Void doWork() throws Exception - { - // If the node has been updated to a record folder - if (newType.equals(TYPE_RECORD_FOLDER) && nodeService.exists(nodeRef)) - { - applySearchAspect(nodeRef); - setupDispositionScheduleProperties(nodeRef); - } - - return null; - } - }); - } /** * Helper method to setup the disposition schedule properties * diff --git a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/issue/RM4619Test.java b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/issue/RM4619Test.java index 9e55647d26..9360f23fe1 100644 --- a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/issue/RM4619Test.java +++ b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/issue/RM4619Test.java @@ -104,7 +104,6 @@ public class RM4619Test extends BaseRMTestCase /* * Check that when the transaction ends the identifier is no longer editable - * And the record folder has the ASPECT_RM_SEARCH aspect */ doTestInTransaction(new Test() { @@ -112,7 +111,6 @@ public class RM4619Test extends BaseRMTestCase public Void run() throws Exception { assertFalse((Boolean)nodeService.getProperty(recordFolder, PROP_ID_IS_TEMPORARILY_EDITABLE)); - assertTrue(nodeService.hasAspect(recordFolder, ASPECT_RM_SEARCH)); return null; }