SAIL-390 (SAIL-294): NodeDAO: Allow cm:auditable to be set

- Added test and guard against client code wiping out cm:auditable by not passing in any values
 - If the cm:auditable behaviour is off and NO cm:auditable properties are passed in, then do nothing


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21192 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-07-15 10:37:56 +00:00
parent 546fb81b59
commit 37e0b65814
2 changed files with 28 additions and 3 deletions

View File

@@ -1600,7 +1600,12 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
if (!policyBehaviourFilter.isEnabled(node.getNodeRef(), ContentModel.ASPECT_AUDITABLE))
{
auditableProps = new AuditablePropertiesEntity();
auditableProps.setAuditValues(null, null, newProps);
boolean containedAuditProperties = auditableProps.setAuditValues(null, null, newProps);
if (!containedAuditProperties)
{
// The behaviour is disabled, but no audit properties were passed in
auditableProps = null;
}
}
// Remove cm:auditable