Liferay 6.1.10-ee-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 exportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, Element fileEntryElement)
           
protected  void exportPreview(PortletDataContext portletDataContext, FileEntry fileEntry, Element fileEntryElement)
           
 void generateImages(FileVersion fileVersion)
           
 Set<String> getImageMimeTypes()
           
static ImageProcessorImpl getInstance()
           
 InputStream getPreviewAsStream(FileVersion fileVersion)
           
 long getPreviewFileSize(FileVersion fileVersion)
           
 String getPreviewType(FileVersion fileVersion)
           
 InputStream getThumbnailAsStream(FileVersion fileVersion, int index)
           
 long getThumbnailFileSize(FileVersion fileVersion, int index)
           
 String getThumbnailType(FileVersion fileVersion)
           
 boolean hasImages(FileVersion fileVersion)
           
 void importGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, FileEntry importedFileEntry, Element fileEntryElement)
           
 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, addFileToStore, deleteFiles, deleteFiles, deleteFiles, deleteFiles, doGetPreviewAsStream, doGetPreviewAsStream, doGetPreviewFileCount, doGetPreviewFileSize, doGetPreviewFileSize, doGetPreviewFileSize, doGetThumbnail, doGetThumbnailAsStream, doGetThumbnailFileSize, exportBinary, exportBinary, exportPreview, exportPreview, exportThumbnail, exportThumbnails, getBinPath, getBinPath, getPathSegment, getPathSegment, getPreviewFilePath, getPreviewFilePath, getPreviewFilePath, getPreviewFilePath, getPreviewTempFile, getPreviewTempFile, getPreviewTempFile, getPreviewTempFile, getPreviewTempFileCount, getPreviewTempFileCount, getPreviewTempFilePath, getPreviewTempFilePath, getPreviewTempFilePath, getPreviewTempFilePath, getPreviewType, getPreviewType, getPreviewTypes, getThumbnailFilePath, getThumbnailFilePath, getThumbnailTempFile, getThumbnailTempFile, getThumbnailTempFilePath, getThumbnailTempFilePath, getThumbnailType, hasThumbnail, hasThumbnails, importPreview, importPreview, importPreviewFromLAR, importThumbnail, importThumbnailFromLAR, importThumbnails, isSupported, isThumbnailEnabled, 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
Overrides:
cleanUp in class DLPreviewableProcessor

cleanUp

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

exportGeneratedFiles

public void exportGeneratedFiles(PortletDataContext portletDataContext,
                                 FileEntry fileEntry,
                                 Element fileEntryElement)
                          throws Exception
Specified by:
exportGeneratedFiles in interface DLProcessor
Specified by:
exportGeneratedFiles in interface ImageProcessor
Throws:
Exception

generateImages

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

getImageMimeTypes

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

getPreviewAsStream

public InputStream getPreviewAsStream(FileVersion fileVersion)
                               throws Exception
Specified by:
getPreviewAsStream in interface ImageProcessor
Throws:
Exception

getPreviewFileSize

public long getPreviewFileSize(FileVersion fileVersion)
                        throws Exception
Specified by:
getPreviewFileSize in interface ImageProcessor
Throws:
Exception

getPreviewType

public String getPreviewType(FileVersion fileVersion)
Specified by:
getPreviewType in interface ImageProcessor
Specified by:
getPreviewType in class DLPreviewableProcessor

getThumbnailAsStream

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

getThumbnailFileSize

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

getThumbnailType

public String getThumbnailType(FileVersion fileVersion)
Specified by:
getThumbnailType in interface ImageProcessor
Specified by:
getThumbnailType in class DLPreviewableProcessor

hasImages

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

importGeneratedFiles

public void importGeneratedFiles(PortletDataContext portletDataContext,
                                 FileEntry fileEntry,
                                 FileEntry importedFileEntry,
                                 Element fileEntryElement)
                          throws Exception
Specified by:
importGeneratedFiles in interface DLProcessor
Specified by:
importGeneratedFiles in interface ImageProcessor
Throws:
Exception

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

exportPreview

protected void exportPreview(PortletDataContext portletDataContext,
                             FileEntry fileEntry,
                             Element fileEntryElement)
                      throws Exception
Throws:
Exception

Liferay 6.1.10-ee-ga1