mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Revert changes and removed cache check.
This commit is contained in:
@@ -21,7 +21,6 @@ package org.alfresco.module.org_alfresco_module_rm.model.behaviour;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -510,17 +509,11 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
|||||||
* @param dispositionAction disposition action
|
* @param dispositionAction disposition action
|
||||||
*/
|
*/
|
||||||
private void updateDispositionActionProperties(NodeRef record, NodeRef dispositionAction)
|
private void updateDispositionActionProperties(NodeRef record, NodeRef dispositionAction)
|
||||||
{
|
|
||||||
Date recordSearchDispositionActionAsOf = (Date)nodeService.getProperty(record, PROP_RS_DISPOSITION_ACTION_AS_OF);
|
|
||||||
DispositionAction da = new DispositionActionImpl(recordsManagementServiceRegistry, dispositionAction);
|
|
||||||
// update disposition action as of if it changed
|
|
||||||
// @since 2.3.1
|
|
||||||
// @see https://issues.alfresco.com/jira/browse/RM-4313
|
|
||||||
if (!methodCached("updateDispositionActionProperties", record)
|
|
||||||
|| isDispositionActionAsOfChanged(recordSearchDispositionActionAsOf, da.getAsOfDate()))
|
|
||||||
{
|
{
|
||||||
Map<QName, Serializable> props = nodeService.getProperties(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_NAME, da.getName());
|
||||||
props.put(PROP_RS_DISPOSITION_ACTION_AS_OF, da.getAsOfDate());
|
props.put(PROP_RS_DISPOSITION_ACTION_AS_OF, da.getAsOfDate());
|
||||||
props.put(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE, nodeService.getProperty(dispositionAction, PROP_DISPOSITION_EVENTS_ELIGIBLE));
|
props.put(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE, nodeService.getProperty(dispositionAction, PROP_DISPOSITION_EVENTS_ELIGIBLE));
|
||||||
@@ -557,23 +550,6 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
|||||||
props.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION));
|
props.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if recordSearchDispositionActionAsOf property has been changed
|
|
||||||
*
|
|
||||||
* @param currentDate current as of date value
|
|
||||||
* @param updatedDate new as of date value
|
|
||||||
* @return true if the as of date has been changed
|
|
||||||
*/
|
|
||||||
private boolean isDispositionActionAsOfChanged(Date currentDate, Date updatedDate)
|
|
||||||
{
|
|
||||||
if ((currentDate != null && updatedDate == null) || (currentDate == null && updatedDate != null))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return currentDate.compareTo(updatedDate) != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On update of event execution information behaviour\
|
* On update of event execution information behaviour\
|
||||||
|
Reference in New Issue
Block a user