Fix for ALF-4595. Incorrect behaviour of some folders' metadata.

Needed to disable audit behaviour when creating rendition child nodes.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22514 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2010-09-14 14:59:50 +00:00
parent 9e4ec6276f
commit f95973d7a3
2 changed files with 15 additions and 1 deletions

View File

@@ -628,7 +628,19 @@ public abstract class AbstractRenderingEngine extends ActionExecuterAbstractBase
NodeRef parentNode = renditionDefinition.getRenditionParent();
QName assocType = renditionDefinition.getRenditionAssociationType();
QName nodeType = getRenditionNodeType(renditionDefinition);
ChildAssociationRef childAssoc = nodeService.createNode(parentNode, assocType, assocName, nodeType, nodeProps);
// Ensure that the creation of rendition children does not cause updates
// to the modified, modifier properties on the source node
behaviourFilter.disableBehaviour(parentNode, ContentModel.ASPECT_AUDITABLE);
ChildAssociationRef childAssoc = null;
try
{
childAssoc = nodeService.createNode(parentNode, assocType, assocName, nodeType, nodeProps);
}
finally
{
behaviourFilter.enableBehaviour(parentNode, ContentModel.ASPECT_AUDITABLE);
}
return childAssoc;
}