From cd43975345f273d70e1f4b14a091ac33f60888fc Mon Sep 17 00:00:00 2001 From: Ross Gale Date: Mon, 30 Apr 2018 11:52:47 +0100 Subject: [PATCH 1/5] WIP edit disposition capability --- .../bootstrap/content/rmEventConfigBootstrap.json | 7 ++++++- .../org_alfresco_module_rm/messages/rm-events.properties | 3 ++- .../jscript/app/JSONConversionComponent.java | 2 +- .../model/RecordsManagementModel.java | 2 ++ .../script/DispositionActionDefinitionPost.java | 6 ++++++ .../script/DispositionActionDefinitionPut.java | 6 ++++++ 6 files changed, 23 insertions(+), 3 deletions(-) diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/content/rmEventConfigBootstrap.json b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/content/rmEventConfigBootstrap.json index 3e2a07df1b..41a44c405e 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/content/rmEventConfigBootstrap.json +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/content/rmEventConfigBootstrap.json @@ -70,7 +70,12 @@ "eventType" : "rmEventType.simple", "eventName" : "case_complete", "eventDisplayLabel" : "rmevent.case_complete" - } + }, + { + "eventType": "rmEventType.simple", + "eventName": "declassification_review", + "eventDisplayLabel": "rmevent.declassification_review" + } ] } diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/rm-events.properties b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/rm-events.properties index ea0094fc86..329c771aa4 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/rm-events.properties +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/rm-events.properties @@ -19,4 +19,5 @@ rmevent.obsolete=Obsolete rmevent.all_allowances_granted_are_terminated=All Allowances Granted are Terminated rmevent.WGI_action_complete=WGI Action Complete rmevent.separation=Separation -rmevent.case_complete=Case Complete \ No newline at end of file +rmevent.case_complete=Case Complete +rmevent.declassification_review=Declassification Review \ No newline at end of file diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java index 70ea9f0cb4..2fc9829cef 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java @@ -455,7 +455,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS // Set the actions array setActions(rmNodeValues, nodeRef); - + //((HashMap)rmNodeValues.get("properties")).put("declassificationEvent",nodeService.getProperties(nodeRef)) return rmNodeValues; } diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java index 1d8d24403c..a3b3212b7c 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java @@ -99,6 +99,7 @@ public interface RecordsManagementModel extends RecordsManagementCustomModel QName PROP_DISPOSITION_PERIOD_PROPERTY = QName.createQName(RM_URI, "dispositionPeriodProperty"); QName PROP_DISPOSITION_EVENT = QName.createQName(RM_URI, "dispositionEvent"); QName PROP_DISPOSITION_EVENT_COMBINATION = QName.createQName(RM_URI, "dispositionEventCombination"); + QName PROP_DISPOSITION_EVALUATOR_COMBINATION = QName.createQName(RM_URI, "dispositionEvaluatorCombination"); QName PROP_DISPOSITION_LOCATION = QName.createQName(RM_URI, "dispositionLocation"); QName PROP_DISPOSITION_ACTION_GHOST_ON_DESTROY = QName.createQName(RM_URI, "dispositionActionGhostOnDestroy"); @@ -239,6 +240,7 @@ public interface RecordsManagementModel extends RecordsManagementCustomModel QName PROP_RS_DISPOSITION_ACTION_AS_OF = QName.createQName(RM_URI, "recordSearchDispositionActionAsOf"); QName PROP_RS_DISPOSITION_EVENTS_ELIGIBLE = QName.createQName(RM_URI, "recordSearchDispositionEventsEligible"); QName PROP_RS_DISPOSITION_EVENTS = QName.createQName(RM_URI, "recordSearchDispositionEvents"); + QName PROP_DISPOSITION_EVENTS = QName.createQName(RM_URI, "dispositionEvents"); QName PROP_RS_VITAL_RECORD_REVIEW_PERIOD = QName.createQName(RM_URI, "recordSearchVitalRecordReviewPeriod"); QName PROP_RS_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION = QName.createQName(RM_URI, "recordSearchVitalRecordReviewPeriodExpression"); QName PROP_RS_DISPOSITION_PERIOD = QName.createQName(RM_URI, "recordSearchDispositionPeriod"); diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java index b6f0569841..66dd4b2617 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java @@ -133,6 +133,12 @@ public class DispositionActionDefinitionPost extends DispositionAbstractBase json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and"); } +// if (json.has("evaluatorCombination")) +// { +// props.put(RecordsManagementModel.PROP_DISPOSITION_EVALUATOR_COMBINATION, +// json.getBoolean("evaluatorCombination") ? "and" : "or"); +// } + if (json.has("location")) { props.put(RecordsManagementModel.PROP_DISPOSITION_LOCATION, diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java index 235be742d2..b11c71770b 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java @@ -132,6 +132,12 @@ public class DispositionActionDefinitionPut extends DispositionAbstractBase json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and"); } +// if (json.has("evaluatorCombination")) +// { +// props.put(RecordsManagementModel.PROP_DISPOSITION_EVALUATOR_COMBINATION, +// json.getBoolean("evaluatorCombination") ? "and" : "or"); +// } + if (json.has("location")) { props.put(RecordsManagementModel.PROP_DISPOSITION_LOCATION, From 4c878d209526457abd549ebbfa44d161f1b9dd83 Mon Sep 17 00:00:00 2001 From: Ross Gale Date: Tue, 1 May 2018 17:51:13 +0100 Subject: [PATCH 2/5] JITC prevent accession disposition action being offered if there is an incomplete event --- .../rm-ui-evaluators-context.xml | 1 + .../jscript/app/JSONConversionComponent.java | 33 ++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml index 3c12a64720..2cc9710263 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml @@ -20,6 +20,7 @@ + diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java index 2fc9829cef..53ab3430f3 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java @@ -28,6 +28,7 @@ package org.alfresco.module.org_alfresco_module_rm.jscript.app; import static org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel.READ_RECORDS; +import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.PROP_RS_DISPOSITION_EVENTS; import static org.alfresco.service.cmr.security.AccessStatus.ALLOWED; import java.util.ArrayList; @@ -38,6 +39,9 @@ import java.util.Map; import org.alfresco.model.ContentModel; import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService; import org.alfresco.module.org_alfresco_module_rm.capability.impl.ViewRecordsCapability; +import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction; +import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService; +import org.alfresco.module.org_alfresco_module_rm.event.EventCompletionDetails; import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind; import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService; import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel; @@ -99,6 +103,11 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS /** site service */ private SiteService siteService; + /** + * Disposition service + */ + private DispositionService dispositionService; + /** Indicators */ private List indicators = new ArrayList(); @@ -230,6 +239,14 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS this.jsonConversionComponentCache = jsonConversionComponentCache; } + /** + * @param dispositionService the disposition service + */ + public void setDispositionService(DispositionService dispositionService) + { + this.dispositionService = dispositionService; + } + /** * The initialise method */ @@ -455,7 +472,21 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS // Set the actions array setActions(rmNodeValues, nodeRef); - //((HashMap)rmNodeValues.get("properties")).put("declassificationEvent",nodeService.getProperties(nodeRef)) + + + //Add details of the next incomplete event in the disposition schedule + if(dispositionService.getNextDispositionAction(nodeRef) != null) + { + for(EventCompletionDetails details: dispositionService.getNextDispositionAction(nodeRef).getEventCompletionDetails()) + { + if(!details.isEventComplete()) + { + ((HashMap) rmNodeValues.get("properties")).put("incompleteDispositionEvent", details.getEventName()); + break; + } + } + } + return rmNodeValues; } From cab68e87dea24b61b0ff1cc0318fc57c1cc67bc5 Mon Sep 17 00:00:00 2001 From: Ross Gale Date: Wed, 2 May 2018 21:52:08 +0100 Subject: [PATCH 3/5] RM-6302 adding the java work to edit disposition schedule --- .../org_alfresco_module_rm/model/recordsModel.xml | 6 ++++++ .../alfresco/rma/dispositionactiondefinition.lib.ftl | 1 + .../jscript/app/JSONConversionComponent.java | 2 ++ .../model/RecordsManagementModel.java | 2 +- .../script/DispositionAbstractBase.java | 7 +++++++ .../script/DispositionActionDefinitionPost.java | 10 +++++----- .../script/DispositionActionDefinitionPut.java | 11 +++++------ 7 files changed, 27 insertions(+), 12 deletions(-) diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml index b49c740fb9..dc0e5277b3 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml @@ -242,6 +242,12 @@ + + Disposition Evaluator Combination + d:boolean + false + + rma:filePlanComponent diff --git a/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/rma/dispositionactiondefinition.lib.ftl b/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/rma/dispositionactiondefinition.lib.ftl index f46011ed82..e0af3c2c06 100644 --- a/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/rma/dispositionactiondefinition.lib.ftl +++ b/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/rma/dispositionactiondefinition.lib.ftl @@ -37,6 +37,7 @@ <#if action.period??>"period": "${action.period}", <#if action.periodProperty??>"periodProperty": "${action.periodProperty}", <#if action.location??>"location": "${action.location}", + <#if action.combineDispositionStepConditions??>"combineDispositionStepConditions": "${action.combineDispositionStepConditions?string}", <#if action.events??>"events": [<#list action.events as event>"${event}"<#if event_has_next>,], "eligibleOnFirstCompleteEvent": ${action.eligibleOnFirstCompleteEvent?string} } diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java index 53ab3430f3..bae437569b 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java @@ -28,6 +28,7 @@ package org.alfresco.module.org_alfresco_module_rm.jscript.app; import static org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel.READ_RECORDS; +import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS; import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.PROP_RS_DISPOSITION_EVENTS; import static org.alfresco.service.cmr.security.AccessStatus.ALLOWED; @@ -481,6 +482,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS { if(!details.isEventComplete()) { + ((HashMap) rmNodeValues.get("properties")).put("combineDispositionStepConditions", nodeService.getProperty(dispositionService.getNextDispositionAction(nodeRef).getDispositionActionDefinition().getNodeRef(), PROP_COMBINE_DISPOSITION_STEP_CONDITIONS)); ((HashMap) rmNodeValues.get("properties")).put("incompleteDispositionEvent", details.getEventName()); break; } diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java index a3b3212b7c..3c02c90627 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java @@ -99,7 +99,7 @@ public interface RecordsManagementModel extends RecordsManagementCustomModel QName PROP_DISPOSITION_PERIOD_PROPERTY = QName.createQName(RM_URI, "dispositionPeriodProperty"); QName PROP_DISPOSITION_EVENT = QName.createQName(RM_URI, "dispositionEvent"); QName PROP_DISPOSITION_EVENT_COMBINATION = QName.createQName(RM_URI, "dispositionEventCombination"); - QName PROP_DISPOSITION_EVALUATOR_COMBINATION = QName.createQName(RM_URI, "dispositionEvaluatorCombination"); + QName PROP_COMBINE_DISPOSITION_STEP_CONDITIONS = QName.createQName(RM_URI, "combineDispositionStepConditions"); QName PROP_DISPOSITION_LOCATION = QName.createQName(RM_URI, "dispositionLocation"); QName PROP_DISPOSITION_ACTION_GHOST_ON_DESTROY = QName.createQName(RM_URI, "dispositionActionGhostOnDestroy"); diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java index c5161ee2f0..be367e060e 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java @@ -27,6 +27,8 @@ package org.alfresco.module.org_alfresco_module_rm.script; +import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -165,6 +167,11 @@ public class DispositionAbstractBase extends AbstractRmWebScript model.put("events", eventNames); } + if(getNodeService().getProperty(actionDef.getNodeRef(), PROP_COMBINE_DISPOSITION_STEP_CONDITIONS) != null) + { + model.put("combineDispositionStepConditions", getNodeService().getProperty(actionDef.getNodeRef(), PROP_COMBINE_DISPOSITION_STEP_CONDITIONS)); + } + return model; } diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java index 66dd4b2617..19357a8680 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java @@ -133,11 +133,11 @@ public class DispositionActionDefinitionPost extends DispositionAbstractBase json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and"); } -// if (json.has("evaluatorCombination")) -// { -// props.put(RecordsManagementModel.PROP_DISPOSITION_EVALUATOR_COMBINATION, -// json.getBoolean("evaluatorCombination") ? "and" : "or"); -// } + if (json.has("combineDispositionStepConditions")) + { + props.put(RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS, + json.getBoolean("combineDispositionStepConditions")); + } if (json.has("location")) { diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java index b11c71770b..510118f047 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java @@ -96,7 +96,6 @@ public class DispositionActionDefinitionPut extends DispositionAbstractBase * * @param actionDef The action definition to update * @param json The JSON to use to create the action definition - * @param schedule The DispositionSchedule the action definition belongs to * @return The updated DispositionActionDefinition */ protected DispositionActionDefinition updateActionDefinition(DispositionActionDefinition actionDef, @@ -132,11 +131,11 @@ public class DispositionActionDefinitionPut extends DispositionAbstractBase json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and"); } -// if (json.has("evaluatorCombination")) -// { -// props.put(RecordsManagementModel.PROP_DISPOSITION_EVALUATOR_COMBINATION, -// json.getBoolean("evaluatorCombination") ? "and" : "or"); -// } + if (json.has("combineDispositionStepConditions")) + { + props.put(RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS, + json.getBoolean("combineDispositionStepConditions")); + } if (json.has("location")) { From 895d6217d9adaed31f47294e67a952e959032364 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 9 May 2018 09:14:39 +0100 Subject: [PATCH 4/5] Update version to V3.0.0-SNAPSHOT. --- pom.xml | 2 +- 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, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index e2a7cf24a9..e91a141ffe 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.alfresco alfresco-rm pom - 2.7-SNAPSHOT + 3.0.0-SNAPSHOT Alfresco Records Management diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index 9104de22fb..1033c353a4 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-rm - 2.7-SNAPSHOT + 3.0.0-SNAPSHOT diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml index 65d2d48dcd..36080c3d8e 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-rm-automation - 2.7-SNAPSHOT + 3.0.0-SNAPSHOT diff --git a/rm-community/pom.xml b/rm-community/pom.xml index d6952c6f7c..9e3e1d0779 100644 --- a/rm-community/pom.xml +++ b/rm-community/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-rm - 2.7-SNAPSHOT + 3.0.0-SNAPSHOT diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml index c391029aad..0f2cb1c749 100644 --- a/rm-community/rm-community-repo/pom.xml +++ b/rm-community/rm-community-repo/pom.xml @@ -9,7 +9,7 @@ org.alfresco alfresco-rm-community - 2.7-SNAPSHOT + 3.0.0-SNAPSHOT diff --git a/rm-community/rm-community-rest-api-explorer/pom.xml b/rm-community/rm-community-rest-api-explorer/pom.xml index 6f91aebef2..cded13c0aa 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-rm-community - 2.7-SNAPSHOT + 3.0.0-SNAPSHOT From 75574d140e2a921cd00e6156419b30a33ab1f36c Mon Sep 17 00:00:00 2001 From: Ross Gale Date: Wed, 9 May 2018 15:52:01 +0100 Subject: [PATCH 5/5] RM-6302 code review comments addressed --- .../jscript/app/JSONConversionComponent.java | 5 +++-- .../org_alfresco_module_rm/model/RecordsManagementModel.java | 1 - .../script/DispositionAbstractBase.java | 2 ++ .../script/DispositionActionDefinitionPost.java | 4 ++-- .../script/DispositionActionDefinitionPut.java | 4 ++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java index bae437569b..da2a7234a3 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java @@ -482,8 +482,9 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS { if(!details.isEventComplete()) { - ((HashMap) rmNodeValues.get("properties")).put("combineDispositionStepConditions", nodeService.getProperty(dispositionService.getNextDispositionAction(nodeRef).getDispositionActionDefinition().getNodeRef(), PROP_COMBINE_DISPOSITION_STEP_CONDITIONS)); - ((HashMap) rmNodeValues.get("properties")).put("incompleteDispositionEvent", details.getEventName()); + HashMap properties = ((HashMap) rmNodeValues.get("properties")); + properties.put("combineDispositionStepConditions", nodeService.getProperty(dispositionService.getNextDispositionAction(nodeRef).getDispositionActionDefinition().getNodeRef(), PROP_COMBINE_DISPOSITION_STEP_CONDITIONS)); + properties.put("incompleteDispositionEvent", details.getEventName()); break; } } diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java index 3c02c90627..f7211b7d33 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java @@ -240,7 +240,6 @@ public interface RecordsManagementModel extends RecordsManagementCustomModel QName PROP_RS_DISPOSITION_ACTION_AS_OF = QName.createQName(RM_URI, "recordSearchDispositionActionAsOf"); QName PROP_RS_DISPOSITION_EVENTS_ELIGIBLE = QName.createQName(RM_URI, "recordSearchDispositionEventsEligible"); QName PROP_RS_DISPOSITION_EVENTS = QName.createQName(RM_URI, "recordSearchDispositionEvents"); - QName PROP_DISPOSITION_EVENTS = QName.createQName(RM_URI, "dispositionEvents"); QName PROP_RS_VITAL_RECORD_REVIEW_PERIOD = QName.createQName(RM_URI, "recordSearchVitalRecordReviewPeriod"); QName PROP_RS_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION = QName.createQName(RM_URI, "recordSearchVitalRecordReviewPeriodExpression"); QName PROP_RS_DISPOSITION_PERIOD = QName.createQName(RM_URI, "recordSearchDispositionPeriod"); diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java index be367e060e..a07f4f7b0f 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java @@ -51,6 +51,8 @@ import org.springframework.extensions.webscripts.WebScriptRequest; */ public class DispositionAbstractBase extends AbstractRmWebScript { + + public final static String COMBINE_DISPOSITION_STEP_CONDITIONS = "combineDispositionStepConditions"; /** * Parses the request and providing it's valid returns the DispositionSchedule object. * diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java index 19357a8680..1fcfcb06b9 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java @@ -133,10 +133,10 @@ public class DispositionActionDefinitionPost extends DispositionAbstractBase json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and"); } - if (json.has("combineDispositionStepConditions")) + if (json.has(COMBINE_DISPOSITION_STEP_CONDITIONS)) { props.put(RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS, - json.getBoolean("combineDispositionStepConditions")); + json.getBoolean(COMBINE_DISPOSITION_STEP_CONDITIONS)); } if (json.has("location")) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java index 510118f047..8d826d6a1a 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java @@ -131,10 +131,10 @@ public class DispositionActionDefinitionPut extends DispositionAbstractBase json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and"); } - if (json.has("combineDispositionStepConditions")) + if (json.has(COMBINE_DISPOSITION_STEP_CONDITIONS)) { props.put(RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS, - json.getBoolean("combineDispositionStepConditions")); + json.getBoolean(COMBINE_DISPOSITION_STEP_CONDITIONS)); } if (json.has("location"))