From 1fec726056c233a0de30a900712833348190e7de Mon Sep 17 00:00:00 2001 From: Roy Wetherall Date: Tue, 10 Jun 2008 10:27:35 +0000 Subject: [PATCH] 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 --- config/alfresco/thumbnail-service-context.xml | 9 ++ .../thumbnail_placeholder_medium.jpg | Bin 0 -> 825 bytes .../org/alfresco/repo/jscript/People.java | 2 +- .../repo/thumbnail/ThumbnailDetails.java | 39 +++++++- .../script/ScriptThumbnailService.java | 87 ++++++++++++++++++ .../thumbnail/script/test_thumbnailAPI.js | 33 +++---- 6 files changed, 146 insertions(+), 24 deletions(-) create mode 100644 config/alfresco/thumbnail/thumbnail_placeholder_medium.jpg create mode 100644 source/java/org/alfresco/repo/thumbnail/script/ScriptThumbnailService.java diff --git a/config/alfresco/thumbnail-service-context.xml b/config/alfresco/thumbnail-service-context.xml index c11d55ac52..e3e38ee4aa 100644 --- a/config/alfresco/thumbnail-service-context.xml +++ b/config/alfresco/thumbnail-service-context.xml @@ -65,6 +65,7 @@ + @@ -94,5 +95,13 @@ + + + + + thumbnailService + + + diff --git a/config/alfresco/thumbnail/thumbnail_placeholder_medium.jpg b/config/alfresco/thumbnail/thumbnail_placeholder_medium.jpg new file mode 100644 index 0000000000000000000000000000000000000000..91f2b5c7720d53f31ecc50f3051002b12e2c58cc GIT binary patch literal 825 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<ECr+Na zbot8FYu9hwy!G(W<0ns_J%91?)yGetzkL1n{m0K=Ab&A3Fhjfr_ZgbM1cClyVqsxs zVF&q(k*OSrnFU!`6%E;h90S=C3x$=88aYIqCNA7~kW<+>=!0ld(M2vX6_bamA3 1000) - //{ - // test.fail("Async thumbanil wasn't created"); - //} - -// count++; -// } + test.assertNull(thumbnailService.getPlaceHolderResourcePath("rubbish")); + test.assertNull(thumbnailService.getPlaceHolderResourcePath("webpreview")); + test.assertNotNull(thumbnailService.getPlaceHolderResourcePath("medium")); } // Execute the tests -testCreateThumbnail(); \ No newline at end of file +testCreateThumbnail(); +testThumbnailService(); \ No newline at end of file