mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'feature/RM-6302_EditDispositionSchedule' into 'release/V2.7.0.x'
merge edit disposition fix to 2.7.0.x See merge request records-management/records-management!998
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm</artifactId>
|
<artifactId>alfresco-rm</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>2.7.0.1-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
<name>Alfresco Records Management</name>
|
<name>Alfresco Records Management</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm</artifactId>
|
<artifactId>alfresco-rm</artifactId>
|
||||||
<version>2.7.0.1-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-automation</artifactId>
|
<artifactId>alfresco-rm-automation</artifactId>
|
||||||
<version>2.7.0.1-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm</artifactId>
|
<artifactId>alfresco-rm</artifactId>
|
||||||
<version>2.7.0.1-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
|
@@ -70,7 +70,12 @@
|
|||||||
"eventType" : "rmEventType.simple",
|
"eventType" : "rmEventType.simple",
|
||||||
"eventName" : "case_complete",
|
"eventName" : "case_complete",
|
||||||
"eventDisplayLabel" : "rmevent.case_complete"
|
"eventDisplayLabel" : "rmevent.case_complete"
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"eventType": "rmEventType.simple",
|
||||||
|
"eventName": "declassification_review",
|
||||||
|
"eventDisplayLabel": "rmevent.declassification_review"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -242,6 +242,12 @@
|
|||||||
</index>
|
</index>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<property name="rma:combineDispositionStepConditions">
|
||||||
|
<title>Disposition Evaluator Combination</title>
|
||||||
|
<type>d:boolean</type>
|
||||||
|
<mandatory>false</mandatory>
|
||||||
|
</property>
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
<mandatory-aspects>
|
<mandatory-aspects>
|
||||||
<aspect>rma:filePlanComponent</aspect>
|
<aspect>rma:filePlanComponent</aspect>
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
<property name="policyComponent" ref="policyComponent" />
|
<property name="policyComponent" ref="policyComponent" />
|
||||||
<property name="jsonConversionComponentCache" ref="jsonConversionComponentCache" />
|
<property name="jsonConversionComponentCache" ref="jsonConversionComponentCache" />
|
||||||
<property name="mimetypeService" ref="MimetypeService" />
|
<property name="mimetypeService" ref="MimetypeService" />
|
||||||
|
<property name="dispositionService" ref="dispositionService" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- extends core bean with RM extensions -->
|
<!-- extends core bean with RM extensions -->
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
<#if action.period??>"period": "${action.period}",</#if>
|
<#if action.period??>"period": "${action.period}",</#if>
|
||||||
<#if action.periodProperty??>"periodProperty": "${action.periodProperty}",</#if>
|
<#if action.periodProperty??>"periodProperty": "${action.periodProperty}",</#if>
|
||||||
<#if action.location??>"location": "${action.location}",</#if>
|
<#if action.location??>"location": "${action.location}",</#if>
|
||||||
|
<#if action.combineDispositionStepConditions??>"combineDispositionStepConditions": "${action.combineDispositionStepConditions?string}",</#if>
|
||||||
<#if action.events??>"events": [<#list action.events as event>"${event}"<#if event_has_next>,</#if></#list>],</#if>
|
<#if action.events??>"events": [<#list action.events as event>"${event}"<#if event_has_next>,</#if></#list>],</#if>
|
||||||
"eligibleOnFirstCompleteEvent": ${action.eligibleOnFirstCompleteEvent?string}
|
"eligibleOnFirstCompleteEvent": ${action.eligibleOnFirstCompleteEvent?string}
|
||||||
}
|
}
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-community</artifactId>
|
<artifactId>alfresco-rm-community</artifactId>
|
||||||
<version>2.7.0.1-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -28,6 +28,8 @@
|
|||||||
package org.alfresco.module.org_alfresco_module_rm.jscript.app;
|
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.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;
|
import static org.alfresco.service.cmr.security.AccessStatus.ALLOWED;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -38,6 +40,9 @@ import java.util.Map;
|
|||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService;
|
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.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.FilePlanComponentKind;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||||
@@ -99,6 +104,11 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
|||||||
/** site service */
|
/** site service */
|
||||||
private SiteService siteService;
|
private SiteService siteService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disposition service
|
||||||
|
*/
|
||||||
|
private DispositionService dispositionService;
|
||||||
|
|
||||||
/** Indicators */
|
/** Indicators */
|
||||||
private List<BaseEvaluator> indicators = new ArrayList<BaseEvaluator>();
|
private List<BaseEvaluator> indicators = new ArrayList<BaseEvaluator>();
|
||||||
|
|
||||||
@@ -230,6 +240,14 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
|||||||
this.jsonConversionComponentCache = jsonConversionComponentCache;
|
this.jsonConversionComponentCache = jsonConversionComponentCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dispositionService the disposition service
|
||||||
|
*/
|
||||||
|
public void setDispositionService(DispositionService dispositionService)
|
||||||
|
{
|
||||||
|
this.dispositionService = dispositionService;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The initialise method
|
* The initialise method
|
||||||
*/
|
*/
|
||||||
@@ -456,6 +474,22 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
|||||||
// Set the actions array
|
// Set the actions array
|
||||||
setActions(rmNodeValues, nodeRef);
|
setActions(rmNodeValues, 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 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return rmNodeValues;
|
return rmNodeValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,6 +99,7 @@ public interface RecordsManagementModel extends RecordsManagementCustomModel
|
|||||||
QName PROP_DISPOSITION_PERIOD_PROPERTY = QName.createQName(RM_URI, "dispositionPeriodProperty");
|
QName PROP_DISPOSITION_PERIOD_PROPERTY = QName.createQName(RM_URI, "dispositionPeriodProperty");
|
||||||
QName PROP_DISPOSITION_EVENT = QName.createQName(RM_URI, "dispositionEvent");
|
QName PROP_DISPOSITION_EVENT = QName.createQName(RM_URI, "dispositionEvent");
|
||||||
QName PROP_DISPOSITION_EVENT_COMBINATION = QName.createQName(RM_URI, "dispositionEventCombination");
|
QName PROP_DISPOSITION_EVENT_COMBINATION = QName.createQName(RM_URI, "dispositionEventCombination");
|
||||||
|
QName PROP_COMBINE_DISPOSITION_STEP_CONDITIONS = QName.createQName(RM_URI, "combineDispositionStepConditions");
|
||||||
QName PROP_DISPOSITION_LOCATION = QName.createQName(RM_URI, "dispositionLocation");
|
QName PROP_DISPOSITION_LOCATION = QName.createQName(RM_URI, "dispositionLocation");
|
||||||
QName PROP_DISPOSITION_ACTION_GHOST_ON_DESTROY = QName.createQName(RM_URI, "dispositionActionGhostOnDestroy");
|
QName PROP_DISPOSITION_ACTION_GHOST_ON_DESTROY = QName.createQName(RM_URI, "dispositionActionGhostOnDestroy");
|
||||||
|
|
||||||
|
@@ -27,6 +27,8 @@
|
|||||||
|
|
||||||
package org.alfresco.module.org_alfresco_module_rm.script;
|
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.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -49,6 +51,8 @@ import org.springframework.extensions.webscripts.WebScriptRequest;
|
|||||||
*/
|
*/
|
||||||
public class DispositionAbstractBase extends AbstractRmWebScript
|
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.
|
* Parses the request and providing it's valid returns the DispositionSchedule object.
|
||||||
*
|
*
|
||||||
@@ -165,6 +169,11 @@ public class DispositionAbstractBase extends AbstractRmWebScript
|
|||||||
model.put("events", eventNames);
|
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;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -133,6 +133,12 @@ public class DispositionActionDefinitionPost extends DispositionAbstractBase
|
|||||||
json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and");
|
json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (json.has(COMBINE_DISPOSITION_STEP_CONDITIONS))
|
||||||
|
{
|
||||||
|
props.put(RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS,
|
||||||
|
json.getBoolean(COMBINE_DISPOSITION_STEP_CONDITIONS));
|
||||||
|
}
|
||||||
|
|
||||||
if (json.has("location"))
|
if (json.has("location"))
|
||||||
{
|
{
|
||||||
props.put(RecordsManagementModel.PROP_DISPOSITION_LOCATION,
|
props.put(RecordsManagementModel.PROP_DISPOSITION_LOCATION,
|
||||||
|
@@ -96,7 +96,6 @@ public class DispositionActionDefinitionPut extends DispositionAbstractBase
|
|||||||
*
|
*
|
||||||
* @param actionDef The action definition to update
|
* @param actionDef The action definition to update
|
||||||
* @param json The JSON to use to create the action definition
|
* @param json The JSON to use to create the action definition
|
||||||
* @param schedule The DispositionSchedule the action definition belongs to
|
|
||||||
* @return The updated DispositionActionDefinition
|
* @return The updated DispositionActionDefinition
|
||||||
*/
|
*/
|
||||||
protected DispositionActionDefinition updateActionDefinition(DispositionActionDefinition actionDef,
|
protected DispositionActionDefinition updateActionDefinition(DispositionActionDefinition actionDef,
|
||||||
@@ -132,6 +131,12 @@ public class DispositionActionDefinitionPut extends DispositionAbstractBase
|
|||||||
json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and");
|
json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (json.has(COMBINE_DISPOSITION_STEP_CONDITIONS))
|
||||||
|
{
|
||||||
|
props.put(RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS,
|
||||||
|
json.getBoolean(COMBINE_DISPOSITION_STEP_CONDITIONS));
|
||||||
|
}
|
||||||
|
|
||||||
if (json.has("location"))
|
if (json.has("location"))
|
||||||
{
|
{
|
||||||
props.put(RecordsManagementModel.PROP_DISPOSITION_LOCATION,
|
props.put(RecordsManagementModel.PROP_DISPOSITION_LOCATION,
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-rm-community</artifactId>
|
<artifactId>alfresco-rm-community</artifactId>
|
||||||
<version>2.7.0.1-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
Reference in New Issue
Block a user