mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
@@ -354,9 +354,22 @@ public interface NodeDAO extends NodeBulkLoader
|
||||
* @param nodeId the node to change
|
||||
* @param modifiedDate the date to set for <b>cm:modified</b>
|
||||
* @return Returns <tt>true</tt> if the <b>cm:modified</b> property was actually set
|
||||
* @deprecated Use {@link #setModifiedProperties(Long, Date, String)} to also change the <b>cm:modifier</b> property
|
||||
*/
|
||||
public boolean setModifiedDate(Long nodeId, Date date);
|
||||
|
||||
/**
|
||||
* Pull the <b>cm:modified</b> up to the current time without changing any other
|
||||
* <b>cm:auditable</b> properties. The change may be done in the current transaction
|
||||
* or in a later transaction.
|
||||
*
|
||||
* @param nodeId the node to change
|
||||
* @param modifiedDate the date to set for <b>cm:modified</b>
|
||||
* @param modifiedBy the name to set for <b>cm:modifier</b>
|
||||
* @return Returns <tt>true</tt> if the <b>cm:modified</b> and <b>cm:modifier</b> properties were actually set
|
||||
*/
|
||||
public boolean setModifiedProperties(Long nodeId, Date modifiedDate, String modifiedBy);
|
||||
|
||||
/*
|
||||
* Aspects
|
||||
*/
|
||||
|
Reference in New Issue
Block a user