Fix for ALF-2047. The fix was to ensure that rendition definitions that produce thumbnails always have PARAM_RENDITION_NODETYPE=cm:thumbnail. To do this, I removed the parameter from the create thumbnail code and added it to the ThumbnailRenditionConvertor, from where it will be picked up by all the code that needs it.

Formerly, the parameter was only set for create thumbnail calls, but not for update thumbnail calls. Therefore when the content nodes were changed as described in the issue, the updated thumbnails were of the default type in the rendition service, which is cm:content which leads to problems in various views.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19955 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2010-04-22 14:40:10 +00:00
parent c3e0afa696
commit 42390dfd1b
3 changed files with 12 additions and 1 deletions

View File

@@ -261,8 +261,14 @@ public class ThumbnailServiceImplTest extends BaseAlfrescoSpringTest
NodeRef thumbnail1 = this.thumbnailService.createThumbnail(jpgOrig, ContentModel.PROP_CONTENT,
MimetypeMap.MIMETYPE_IMAGE_JPEG, imageTransformationOptions, "small");
// Thumbnails should always be of type cm:thumbnail.
assertEquals(ContentModel.TYPE_THUMBNAIL, nodeService.getType(thumbnail1));
// Update the thumbnail
this.thumbnailService.updateThumbnail(thumbnail1, imageTransformationOptions);
// ALF-2047. Thumbnails were changing to type cm:content after update.
assertEquals(ContentModel.TYPE_THUMBNAIL, nodeService.getType(thumbnail1));
}
public void testGetThumbnailByName() throws Exception