Merge remote-tracking branch 'origin/release/V2.4' into merge-2.5/Merge231ReleaseIn25

# Conflicts:
#	rm-automation/src/main/java/org/alfresco/po/common/util/Utils.java
#	rm-automation/src/main/java/org/alfresco/po/rm/browse/fileplan/Record.java
#	rm-automation/src/main/java/org/alfresco/po/rm/details/category/DispositionBlock.java
#	rm-automation/src/main/java/org/alfresco/po/rm/details/record/RecordActionsPanel.java
#	rm-automation/src/main/java/org/alfresco/po/rm/dialog/AuthoritySelectDialog.java
#	rm-automation/src/main/java/org/alfresco/po/rm/dialog/addrelationship/DeleteRelationshipPrompt.java
#	rm-automation/src/main/java/org/alfresco/po/rm/dialog/addrelationship/SelectRecordDialog.java
#	rm-automation/src/main/java/org/alfresco/po/rm/disposition/edit/steps/EditDispositionSchedulePage.java
#	rm-automation/src/main/java/org/alfresco/po/share/page/Message.java
#	rm-automation/src/main/java/org/alfresco/po/share/rules/RuleActions.java
#	rm-automation/src/test/java/org/alfresco/dataprep/RecordsManagementService.java
#	rm-automation/src/test/java/org/alfresco/test/BaseTest.java
#	rm-automation/src/test/java/org/alfresco/test/TestData.java
#	rm-automation/src/test/java/org/alfresco/test/integration/classify/BrowseClassifiedRecords.java
#	rm-automation/src/test/java/org/alfresco/test/integration/classify/ClassifyRecord.java
#	rm-automation/src/test/java/org/alfresco/test/integration/classify/EditClassification.java
#	rm-automation/src/test/java/org/alfresco/test/integration/classify/SearchClassifiedDocuments.java
#	rm-automation/src/test/java/org/alfresco/test/integration/classify/SearchClassifiedRecords.java
#	rm-automation/src/test/java/org/alfresco/test/integration/level2/disposition_schedule/DispositionScheduleLinkedRecords.java
#	rm-automation/src/test/java/org/alfresco/test/integration/smoke/RecordsDispositionSchedule.java
This commit is contained in:
Oana Nechiforescu
2016-11-15 18:04:48 +02:00
2 changed files with 63 additions and 41 deletions

View File

@@ -519,48 +519,45 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
*/
private void updateDispositionActionProperties(NodeRef record, NodeRef dispositionAction)
{
if (!methodCached("updateDispositionActionProperties", record))
Map<QName, Serializable> props = nodeService.getProperties(record);
DispositionAction da = new DispositionActionImpl(recordsManagementServiceRegistry, dispositionAction);
props.put(PROP_RS_DISPOSITION_ACTION_NAME, da.getName());
props.put(PROP_RS_DISPOSITION_ACTION_AS_OF, da.getAsOfDate());
props.put(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE, nodeService.getProperty(dispositionAction, PROP_DISPOSITION_EVENTS_ELIGIBLE));
DispositionActionDefinition daDefinition = da.getDispositionActionDefinition();
if (daDefinition != null)
{
Map<QName, Serializable> props = nodeService.getProperties(record);
DispositionAction da = new DispositionActionImpl(recordsManagementServiceRegistry, dispositionAction);
props.put(PROP_RS_DISPOSITION_ACTION_NAME, da.getName());
props.put(PROP_RS_DISPOSITION_ACTION_AS_OF, da.getAsOfDate());
props.put(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE, nodeService.getProperty(dispositionAction, PROP_DISPOSITION_EVENTS_ELIGIBLE));
DispositionActionDefinition daDefinition = da.getDispositionActionDefinition();
if (daDefinition != null)
Period period = daDefinition.getPeriod();
if (period != null)
{
Period period = daDefinition.getPeriod();
if (period != null)
{
props.put(PROP_RS_DISPOSITION_PERIOD, period.getPeriodType());
props.put(PROP_RS_DISPOSITION_PERIOD_EXPRESSION, period.getExpression());
}
else
{
props.put(PROP_RS_DISPOSITION_PERIOD, null);
props.put(PROP_RS_DISPOSITION_PERIOD_EXPRESSION, null);
}
props.put(PROP_RS_DISPOSITION_PERIOD, period.getPeriodType());
props.put(PROP_RS_DISPOSITION_PERIOD_EXPRESSION, period.getExpression());
}
nodeService.setProperties(record, props);
if (logger.isDebugEnabled())
else
{
logger.debug("Set rma:recordSearchDispositionActionName for node " + record + " to: " +
props.get(PROP_RS_DISPOSITION_ACTION_NAME));
logger.debug("Set rma:recordSearchDispositionActionAsOf for node " + record + " to: " +
props.get(PROP_RS_DISPOSITION_ACTION_AS_OF));
logger.debug("Set rma:recordSearchDispositionEventsEligible for node " + record + " to: " +
props.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE));
logger.debug("Set rma:recordSearchDispositionPeriod for node " + record + " to: " +
props.get(PROP_RS_DISPOSITION_PERIOD));
logger.debug("Set rma:recordSearchDispositionPeriodExpression for node " + record + " to: " +
props.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION));
props.put(PROP_RS_DISPOSITION_PERIOD, null);
props.put(PROP_RS_DISPOSITION_PERIOD_EXPRESSION, null);
}
}
nodeService.setProperties(record, props);
if (logger.isDebugEnabled())
{
logger.debug("Set rma:recordSearchDispositionActionName for node " + record + " to: " +
props.get(PROP_RS_DISPOSITION_ACTION_NAME));
logger.debug("Set rma:recordSearchDispositionActionAsOf for node " + record + " to: " +
props.get(PROP_RS_DISPOSITION_ACTION_AS_OF));
logger.debug("Set rma:recordSearchDispositionEventsEligible for node " + record + " to: " +
props.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE));
logger.debug("Set rma:recordSearchDispositionPeriod for node " + record + " to: " +
props.get(PROP_RS_DISPOSITION_PERIOD));
logger.debug("Set rma:recordSearchDispositionPeriodExpression for node " + record + " to: " +
props.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION));
}
}
/**