mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Thumbanil API: suport for placeholder thumbnails added and queueing of thumbnails for creation on get
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9434 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -131,7 +131,7 @@ public class ThumbnailServiceTest extends BaseWebScriptTest
|
||||
|
||||
public void testCreateAsyncThumbnail() throws Exception
|
||||
{
|
||||
// Check for pdfToSWF transformation before doing test
|
||||
// Check for pdfToSWF transformation before doing test
|
||||
if (this.contentService.getTransformer(MimetypeMap.MIMETYPE_PDF, MimetypeMap.MIMETYPE_FLASH) != null)
|
||||
{
|
||||
String url = "/api/node/" + pdfNode.getStoreRef().getProtocol() + "/" + pdfNode.getStoreRef().getIdentifier() + "/" + pdfNode.getId() + "/content/thumbnails?as=true";
|
||||
@@ -179,5 +179,27 @@ public class ThumbnailServiceTest extends BaseWebScriptTest
|
||||
}
|
||||
}
|
||||
|
||||
public void testPlaceHolder()
|
||||
throws Exception
|
||||
{
|
||||
if (this.contentService.getTransformer(MimetypeMap.MIMETYPE_PDF, MimetypeMap.MIMETYPE_FLASH) != null)
|
||||
{
|
||||
// Check that there is no place holder set for webpreview
|
||||
this.getRequest(getThumbnailsURL(pdfNode) + "/webpreview", 404);
|
||||
this.getRequest(getThumbnailsURL(pdfNode) + "/webpreview?ph=true", 404);
|
||||
}
|
||||
|
||||
// Check that here is a place holder for medium
|
||||
this.getRequest(getThumbnailsURL(jpgNode) + "/medium", 404);
|
||||
this.getRequest(getThumbnailsURL(jpgNode) + "/medium?ph=true", 200);
|
||||
|
||||
System.out.println(getThumbnailsURL(jpgNode) + "/medium?ph=true");
|
||||
}
|
||||
|
||||
private String getThumbnailsURL(NodeRef nodeRef)
|
||||
{
|
||||
return "/api/node/" + nodeRef.getStoreRef().getProtocol() + "/" + nodeRef.getStoreRef().getIdentifier() + "/" + nodeRef.getId() + "/content/thumbnails";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user