]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5466: Removing generic thumbnail generator Nuxeo listener since it is having...
authorRichard Millet <remillet@berkeley.edu>
Thu, 23 Aug 2012 23:35:02 +0000 (16:35 -0700)
committerRichard Millet <remillet@berkeley.edu>
Thu, 23 Aug 2012 23:35:02 +0000 (16:35 -0700)
.gitignore
3rdparty/nuxeo/pom.xml
services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoImageUtils.java

index 32b9962d6979897b51d27e25658a1413f484b22a..c7db4707be70cfe822e33df0b732011dfc9151c7 100644 (file)
@@ -1,3 +1,7 @@
+3rdparty/nuxeo/nuxeo-platform-thumbnail/.classpath
+3rdparty/nuxeo/nuxeo-platform-thumbnail/.project
+3rdparty/nuxeo/nuxeo-platform-thumbnail/.settings/
+logo.miff
 target/
 *tenant-bindings.merged.xml
 .settings/org.eclipse.core.resources.prefs
index 3ac17551ae9020433c63f59042c963a75cc8fdf5..773efa9a5dec955661be292f2f20b0de7ae25d1c 100644 (file)
@@ -17,7 +17,9 @@
         <module>nuxeo-platform-collectionspace</module>
                <module>nuxeo-platform-quote-api</module>
                <module>nuxeo-platform-quote</module>
+               <!-- REM : 8/23/2012 - Disabled due to integration and dependency issues between ImageMagick and Ghostscript on Linux machines
                <module>nuxeo-platform-thumbnail</module>
+               -->
        </modules>
 
     <dependencies>
index 67af453bcd539202bdd34f8a99b5ed435e8a0dfd..a02b1f86a6ff110ccd7aab31c4974aaf9e78b506 100644 (file)
@@ -798,6 +798,20 @@ public class NuxeoImageUtils {
 \r
                return result;\r
        }\r
+       \r
+       /*\r
+        * Find out if this document's blob/file-contents are allowed to be purged.  For instance, we currently\r
+        * only want to allow the purging the contents of Nuxeo "Picture" documents. \r
+        */\r
+       static private boolean isPurgeAllowed(DocumentModel docModel) {\r
+               boolean result = false;\r
+               \r
+               if (docModel.hasFacet(ImagingDocumentConstants.PICTURE_FACET) == true) {\r
+                       result = true; // Yes, delete/purge the original content\r
+               }\r
+               \r
+               return result;\r
+       }\r
 \r
        /**\r
         * Creates the image blob.\r
@@ -837,8 +851,8 @@ public class NuxeoImageUtils {
 \r
                        result = createBlobsCommon(documentModel, fileBlob); // Now create our metadata resource document\r
 \r
-                       // If the sender only wanted use to generate derivatives, we need to clear the original content\r
-                       if (purgeOriginal == true) {\r
+                       // If the sender wanted us to generate only derivatives, we need to purge/clear the original contents\r
+                       if (purgeOriginal == true && isPurgeAllowed(documentModel) == true) {\r
                                // Empty the document model's "content" property -this does not delete the actual file/blob\r
                                documentModel.setPropertyValue("file:content", (Serializable) null);\r
                                \r