Liferay 6.1.0-ce-ga1

com.liferay.portlet.documentlibrary.util
Class ImageProcessorImpl

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

public class ImageProcessorImpl
extends DLPreviewableProcessor
implements ImageProcessor


Field Summary
 
Fields inherited from class com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor
PREVIEW_PATH, PREVIEW_TMP_PATH, REPOSITORY_ID, THUMBNAIL_INDEX_CUSTOM_1, THUMBNAIL_INDEX_CUSTOM_2, THUMBNAIL_INDEX_DEFAULT, THUMBNAIL_PATH, THUMBNAIL_TMP_PATH
 
Method Summary
 void cleanUp(FileEntry fileEntry)
           
 void cleanUp(FileVersion fileVersion)
           
 void generateImages(FileVersion fileVersion)
           
 Set<String> getImageMimeTypes()
           
static ImageProcessorImpl getInstance()
           
protected  String getPreviewType(FileVersion fileVersion)
           
 InputStream getThumbnailAsStream(FileVersion fileVersion, int thumbnailIndex)
           
 long getThumbnailFileSize(FileVersion fileVersion, int thumbnailIndex)
           
protected  String getThumbnailType(FileVersion fileVersion)
           
 boolean hasImages(FileVersion fileVersion)
           
 boolean isImageSupported(FileVersion fileVersion)
           
 boolean isImageSupported(String mimeType)
           
 boolean isSupported(String mimeType)
           
 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, hasThumbnail, isCustomThumbnailsEnabled, isSupported, storeThumbnailImages, storeThumbnailImages, storeThumbnailmage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ImageProcessorImpl getInstance()

cleanUp

public void cleanUp(FileEntry fileEntry)
Specified by:
cleanUp in interface DLProcessor
Specified by:
cleanUp in interface ImageProcessor

cleanUp

public void cleanUp(FileVersion fileVersion)
Specified by:
cleanUp in interface DLProcessor
Specified by:
cleanUp in interface ImageProcessor

generateImages

public void generateImages(FileVersion fileVersion)
Specified by:
generateImages in interface ImageProcessor

getImageMimeTypes

public Set<String> getImageMimeTypes()
Specified by:
getImageMimeTypes in interface ImageProcessor

getThumbnailAsStream

public InputStream getThumbnailAsStream(FileVersion fileVersion,
                                        int thumbnailIndex)
                                 throws Exception
Specified by:
getThumbnailAsStream in interface ImageProcessor
Throws:
Exception

getThumbnailFileSize

public long getThumbnailFileSize(FileVersion fileVersion,
                                 int thumbnailIndex)
                          throws Exception
Specified by:
getThumbnailFileSize in interface ImageProcessor
Throws:
Exception

hasImages

public boolean hasImages(FileVersion fileVersion)
Specified by:
hasImages in interface ImageProcessor

isImageSupported

public boolean isImageSupported(FileVersion fileVersion)
Specified by:
isImageSupported in interface ImageProcessor

isImageSupported

public boolean isImageSupported(String mimeType)
Specified by:
isImageSupported in interface ImageProcessor

isSupported

public boolean isSupported(String mimeType)
Specified by:
isSupported in interface DLProcessor
Specified by:
isSupported in interface ImageProcessor

storeThumbnail

public void storeThumbnail(long companyId,
                           long groupId,
                           long fileEntryId,
                           long fileVersionId,
                           long custom1ImageId,
                           long custom2ImageId,
                           InputStream is,
                           String type)
                    throws Exception
Specified by:
storeThumbnail in interface ImageProcessor
Throws:
Exception

trigger

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

Specified by:
trigger in interface DLProcessor
Specified by:
trigger in interface ImageProcessor
Parameters:
fileVersion - the latest file version to process

getPreviewType

protected String getPreviewType(FileVersion fileVersion)
Specified by:
getPreviewType in class DLPreviewableProcessor

getThumbnailType

protected String getThumbnailType(FileVersion fileVersion)
Specified by:
getThumbnailType in class DLPreviewableProcessor

Liferay 6.1.0-ce-ga1