From cfc5d1ac748f8e0b71b147ae213ebce18bd50f51 Mon Sep 17 00:00:00 2001 From: Eva Vasques Date: Mon, 14 Dec 2020 09:56:54 +0000 Subject: [PATCH 1/4] Revert "Revert "Merge pull request #1291 from Alfresco/hotfix-3.2.0.11/MNT-22062_diplay_cat_retention_poor_performance"" This reverts commit e7b3724d44a7d768bce3a6dada5426e123e7265d. --- .../disposition/DispositionServiceImpl.java | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/disposition/DispositionServiceImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/disposition/DispositionServiceImpl.java index 5502aed5ba..0abdf64dd6 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/disposition/DispositionServiceImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/disposition/DispositionServiceImpl.java @@ -503,7 +503,52 @@ public class DispositionServiceImpl extends ServiceBaseImpl @Override public boolean hasDisposableItems(DispositionSchedule dispositionSchdule) { - return !getDisposableItems(dispositionSchdule).isEmpty(); + ParameterCheck.mandatory("dispositionSchedule", dispositionSchdule); + + // Get the associated container + NodeRef rmContainer = getAssociatedRecordsManagementContainer(dispositionSchdule); + + return hasDisposableItemsImpl(dispositionSchdule.isRecordLevelDisposition(), rmContainer); + } + + /** + * Method that provides a boolean if given Records Management Container has disposable items. + * This method is similar to getDisposableItemsImpl(boolean isRecordLevelDisposition, NodeRef rmContainer) but with improved performance: + * For RecordLevelDisposition it will limit Record retrieval to 1. + * Early returns once the first occurrence is found. + * @param isRecordLevelDisposition + * @param rmContainer + * @return + */ + private boolean hasDisposableItemsImpl(boolean isRecordLevelDisposition, NodeRef rmContainer) + { + List items = filePlanService.getAllContained(rmContainer); + for (NodeRef item : items) + { + if (recordFolderService.isRecordFolder(item)) + { + if (isRecordLevelDisposition) + { + List assocs = nodeService.getChildAssocs(item, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL, 1, true); + if (!assocs.isEmpty()) + { + return true; + } + } + else + { + return true; + } + } + else if (filePlanService.isRecordCategory(item) && getAssociatedDispositionScheduleImpl(item) == null) + { + if (hasDisposableItemsImpl(isRecordLevelDisposition, item)); + { + return true; + } + } + } + return false; } /** From d14a4ecdc8e0f65b9eaeb8de751cd2c13c94d3aa Mon Sep 17 00:00:00 2001 From: ehardon Date: Wed, 16 Dec 2020 08:57:40 +0200 Subject: [PATCH 2/4] [enterprise release 3.4.1.1 3.4.1.2-SNAPSHOT][publish] [skip tests] From c8dd4b128859d0bfb6ab5bf1f7dfd9e53f4acc17 Mon Sep 17 00:00:00 2001 From: Travis CI User Date: Wed, 16 Dec 2020 07:55:29 +0000 Subject: [PATCH 3/4] [maven-release-plugin][skip ci] prepare release V3.4.1.1 --- pom.xml | 4 ++-- rm-automation/pom.xml | 2 +- rm-automation/rm-automation-community-rest-api/pom.xml | 2 +- rm-community/pom.xml | 2 +- rm-community/rm-community-repo/pom.xml | 2 +- rm-community/rm-community-rest-api-explorer/pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index c739f8d691..d810a9c62c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.alfresco alfresco-governance-services pom - 3.4.1.1-SNAPSHOT + 3.4.1.1 Alfresco Governance Services http://www.alfresco.org/ @@ -18,7 +18,7 @@ scm:git:https://github.com/Alfresco/governance-services.git scm:git:https://github.com/Alfresco/governance-services.git https://github.com/Alfresco/governance-services - V3.4.1 + V3.4.1.1 diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index fe7c5cfcba..81e6b504ce 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-governance-services - 3.4.1.1-SNAPSHOT + 3.4.1.1 diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml index aeac406a67..e2d5985aaa 100644 --- a/rm-automation/rm-automation-community-rest-api/pom.xml +++ b/rm-automation/rm-automation-community-rest-api/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-governance-services-automation - 3.4.1.1-SNAPSHOT + 3.4.1.1 diff --git a/rm-community/pom.xml b/rm-community/pom.xml index 8767fddc5d..e1ac300e2e 100644 --- a/rm-community/pom.xml +++ b/rm-community/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-governance-services - 3.4.1.1-SNAPSHOT + 3.4.1.1 diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml index 8d9360703d..faa6676280 100644 --- a/rm-community/rm-community-repo/pom.xml +++ b/rm-community/rm-community-repo/pom.xml @@ -9,7 +9,7 @@ org.alfresco alfresco-governance-services-community - 3.4.1.1-SNAPSHOT + 3.4.1.1 diff --git a/rm-community/rm-community-rest-api-explorer/pom.xml b/rm-community/rm-community-rest-api-explorer/pom.xml index 6f902058fa..5c24e03480 100644 --- a/rm-community/rm-community-rest-api-explorer/pom.xml +++ b/rm-community/rm-community-rest-api-explorer/pom.xml @@ -7,7 +7,7 @@ org.alfresco alfresco-governance-services-community - 3.4.1.1-SNAPSHOT + 3.4.1.1 From a3c56c654771a902b7d64122591791a0e11e52f0 Mon Sep 17 00:00:00 2001 From: Travis CI User Date: Wed, 16 Dec 2020 07:55:38 +0000 Subject: [PATCH 4/4] [maven-release-plugin][skip ci] prepare for next development iteration --- pom.xml | 4 ++-- rm-automation/pom.xml | 2 +- rm-automation/rm-automation-community-rest-api/pom.xml | 2 +- rm-community/pom.xml | 2 +- rm-community/rm-community-repo/pom.xml | 2 +- rm-community/rm-community-rest-api-explorer/pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index d810a9c62c..c47b1e0047 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.alfresco alfresco-governance-services pom - 3.4.1.1 + 3.4.1.2-SNAPSHOT Alfresco Governance Services http://www.alfresco.org/ @@ -18,7 +18,7 @@ scm:git:https://github.com/Alfresco/governance-services.git scm:git:https://github.com/Alfresco/governance-services.git https://github.com/Alfresco/governance-services - V3.4.1.1 + V3.4.1 diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index 81e6b504ce..d1f0a95744 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-governance-services - 3.4.1.1 + 3.4.1.2-SNAPSHOT diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml index e2d5985aaa..d612adbf00 100644 --- a/rm-automation/rm-automation-community-rest-api/pom.xml +++ b/rm-automation/rm-automation-community-rest-api/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-governance-services-automation - 3.4.1.1 + 3.4.1.2-SNAPSHOT diff --git a/rm-community/pom.xml b/rm-community/pom.xml index e1ac300e2e..d5bf60d48d 100644 --- a/rm-community/pom.xml +++ b/rm-community/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-governance-services - 3.4.1.1 + 3.4.1.2-SNAPSHOT diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml index faa6676280..7be0cb29f5 100644 --- a/rm-community/rm-community-repo/pom.xml +++ b/rm-community/rm-community-repo/pom.xml @@ -9,7 +9,7 @@ org.alfresco alfresco-governance-services-community - 3.4.1.1 + 3.4.1.2-SNAPSHOT diff --git a/rm-community/rm-community-rest-api-explorer/pom.xml b/rm-community/rm-community-rest-api-explorer/pom.xml index 5c24e03480..0ebffeab2d 100644 --- a/rm-community/rm-community-rest-api-explorer/pom.xml +++ b/rm-community/rm-community-rest-api-explorer/pom.xml @@ -7,7 +7,7 @@ org.alfresco alfresco-governance-services-community - 3.4.1.1 + 3.4.1.2-SNAPSHOT