Liferay 6.1.0-ce-b4

com.liferay.portlet.documentlibrary.util
Class ImageProcessor

java.lang.Object
  extended by com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor
      extended by com.liferay.portlet.documentlibrary.util.ImageProcessor
All Implemented Interfaces:
DLProcessor

public class ImageProcessor
extends DLPreviewableProcessor


Field Summary
 
Fields inherited from class com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor
PREVIEW_PATH, PREVIEW_TMP_PATH, REPOSITORY_ID, THUMBNAIL_PATH, THUMBNAIL_TMP_PATH
 
Constructor Summary
ImageProcessor()
           
 
Method Summary
 void cleanUp(FileEntry fileEntry)
           
 void cleanUp(FileVersion fileVersion)
           
static void generateImages(FileVersion fileVersion)
           
static InputStream getCustom1AsStream(FileVersion fileVersion)
           
static long getCustom1FileSize(FileVersion fileVersion)
           
static InputStream getCustom2AsStream(FileVersion fileVersion)
           
static long getCustom2FileSize(FileVersion fileVersion)
           
static Set<String> getImageMimeTypes()
           
static InputStream getThumbnailAsStream(FileVersion fileVersion)
           
static long getThumbnailFileSize(FileVersion fileVersion)
           
static boolean hasImages(FileVersion fileVersion)
           
static boolean hasThumbnailImage(FileVersion fileVersion)
           
 boolean isSupported(String mimeType)
           
static void storeThumbnail(long companyId, long groupId, long fileEntryId, long fileVersionId, long custom1ImageId, long custom2ImageId, InputStream is, String type)
           
 void trigger(FileVersion fileVersion)
          Launches the processor's work with respect to the given file version.
 
Methods inherited from class com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor
addFileToStore, deleteFiles, deleteFiles, deleteFiles, deleteFiles, doGetPreviewAsStream, doGetPreviewAsStream, doGetPreviewFileCount, doGetPreviewFileSize, doGetPreviewFileSize, doGetThumbnailAsStream, doGetThumbnailFileSize, getPathSegment, getPathSegment, getPreviewFilePath, getPreviewFilePath, getPreviewTempFile, getPreviewTempFile, getPreviewTempFileCount, getPreviewTempFilePath, getPreviewTempFilePath, getThumbnailFilePath, getThumbnailTempFile, getThumbnailTempFilePath, isSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageProcessor

public ImageProcessor()
Method Detail

cleanUp

public void cleanUp(FileEntry fileEntry)

cleanUp

public void cleanUp(FileVersion fileVersion)

generateImages

public static void generateImages(FileVersion fileVersion)

getCustom1AsStream

public static InputStream getCustom1AsStream(FileVersion fileVersion)
                                      throws Exception
Throws:
Exception

getCustom1FileSize

public static long getCustom1FileSize(FileVersion fileVersion)
                               throws Exception
Throws:
Exception

getCustom2AsStream

public static InputStream getCustom2AsStream(FileVersion fileVersion)
                                      throws Exception
Throws:
Exception

getCustom2FileSize

public static long getCustom2FileSize(FileVersion fileVersion)
                               throws Exception
Throws:
Exception

getImageMimeTypes

public static Set<String> getImageMimeTypes()

getThumbnailAsStream

public static InputStream getThumbnailAsStream(FileVersion fileVersion)
                                        throws Exception
Throws:
Exception

getThumbnailFileSize

public static long getThumbnailFileSize(FileVersion fileVersion)
                                 throws Exception
Throws:
Exception

hasImages

public static boolean hasImages(FileVersion fileVersion)

hasThumbnailImage

public static boolean hasThumbnailImage(FileVersion fileVersion)

storeThumbnail

public static void storeThumbnail(long companyId,
                                  long groupId,
                                  long fileEntryId,
                                  long fileVersionId,
                                  long custom1ImageId,
                                  long custom2ImageId,
                                  InputStream is,
                                  String type)
                           throws Exception
Throws:
Exception

isSupported

public boolean isSupported(String mimeType)

trigger

public void trigger(FileVersion fileVersion)
Description copied from interface: DLProcessor
Launches the processor's work with respect to the given file version.

Parameters:
fileVersion - the latest file version to process

Liferay 6.1.0-ce-b4