diff --git a/pom.xml b/pom.xml index da542adffa..6c4ed2936a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.alfresco alfresco-governance-services pom - 3.4.1-SNAPSHOT + 3.4.2-SNAPSHOT Alfresco Governance Services http://www.alfresco.org/ diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index 07aa4d97e9..f3852883e5 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-governance-services - 3.4.1-SNAPSHOT + 3.4.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 5c8fb293e6..15a86e87e5 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-SNAPSHOT + 3.4.2-SNAPSHOT diff --git a/rm-community/pom.xml b/rm-community/pom.xml index cc0be9ba64..7c6e53e54a 100644 --- a/rm-community/pom.xml +++ b/rm-community/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-governance-services - 3.4.1-SNAPSHOT + 3.4.2-SNAPSHOT diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml index fd227719b3..b5bab17de8 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-SNAPSHOT + 3.4.2-SNAPSHOT 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 0abdf64dd6..5502aed5ba 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,52 +503,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl @Override public boolean hasDisposableItems(DispositionSchedule dispositionSchdule) { - 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; + return !getDisposableItems(dispositionSchdule).isEmpty(); } /** diff --git a/rm-community/rm-community-rest-api-explorer/pom.xml b/rm-community/rm-community-rest-api-explorer/pom.xml index 8e8b8ef613..c0264cda29 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-SNAPSHOT + 3.4.2-SNAPSHOT