mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Added more unit tests for RenditionNodeManager which is used by the RenditionServiceImpl to decide where to create a rendition node and how to handle the old rendition node if one exists.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19445 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -65,7 +65,7 @@ public class RenditionNodeManager
|
||||
public ChildAssociationRef findOrCreateRenditionNode()
|
||||
{
|
||||
QName renditionName = renditionDefinition.getRenditionName();
|
||||
// If no rendition already exists create anew rendition node and
|
||||
// If no rendition already exists create a new rendition node and
|
||||
// association.
|
||||
if (oldRendition == null)
|
||||
{
|
||||
@@ -94,7 +94,9 @@ public class RenditionNodeManager
|
||||
|
||||
private ChildAssociationRef moveRendition(QName associationName)
|
||||
{
|
||||
return nodeService.moveNode(oldRendition, location.getParentRef(), ContentModel.ASSOC_CONTAINS, associationName);
|
||||
NodeRef parent = location.getParentRef();
|
||||
QName assocType = sourceNode.equals(parent) ? RenditionModel.ASSOC_RENDITION : ContentModel.ASSOC_CONTAINS;
|
||||
return nodeService.moveNode(oldRendition, parent, assocType, associationName);
|
||||
}
|
||||
|
||||
private void orphanRendition(QNamePattern renditionName)
|
||||
|
Reference in New Issue
Block a user