mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -32,6 +32,7 @@ import junit.framework.TestCase;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.action.executer.ActionExecuter;
|
||||
import org.alfresco.repo.policy.BehaviourFilter;
|
||||
import org.alfresco.repo.rendition.RenditionDefinitionImpl;
|
||||
import org.alfresco.repo.rendition.executer.AbstractRenderingEngine.RenderingContext;
|
||||
import org.alfresco.service.cmr.rendition.RenditionDefinition;
|
||||
@@ -64,6 +65,7 @@ public class AbstractRenderingEngineTest extends TestCase
|
||||
engine = new TestRenderingEngine();
|
||||
engine.setContentService(contentService);
|
||||
engine.setNodeService(nodeService);
|
||||
engine.setBehaviourFilter(mock(BehaviourFilter.class));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
Reference in New Issue
Block a user