Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

83892: Merged FEATURE2 to HEAD-BUG-FIX (5.0)
      82450, 82478, 83318, 83442 : ACE-898 : Share uses "ModifiedBy" which is not always correct for folders
         - Propagate cm:modifier and cm:modified. Feature related test


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@84595 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-09-18 17:16:45 +00:00
parent d9363413c3
commit 03952f8551
5 changed files with 471 additions and 16 deletions

View File

@@ -2454,6 +2454,11 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
@Override
public boolean setModifiedDate(Long nodeId, Date modifiedDate)
{
return setModifiedProperties(nodeId, modifiedDate, null);
}
@Override
public boolean setModifiedProperties(Long nodeId, Date modifiedDate, String modifiedBy) {
// Do nothing if the node is not cm:auditable
if (!hasNodeAspect(nodeId, ContentModel.ASPECT_AUDITABLE))
{
@@ -2469,13 +2474,17 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
{
// The properties should be present
auditableProps = new AuditablePropertiesEntity();
auditableProps.setAuditValues(null, modifiedDate, true, 1000L);
auditableProps.setAuditValues(modifiedBy, modifiedDate, true, 1000L);
dateChanged = true;
}
else
{
auditableProps = new AuditablePropertiesEntity(auditableProps);
dateChanged = auditableProps.setAuditModified(modifiedDate, 1000L);
if (dateChanged)
{
auditableProps.setAuditModifier(modifiedBy);
}
}
if (dateChanged)
{