Liferay 6.1.2-ce-ga3

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
 
Constructor Summary
ImageProcessorImpl()
           
 
Method Summary
 void afterPropertiesSet()
           
 void cleanUp(FileEntry fileEntry)
           
 void cleanUp(FileVersion fileVersion)
           
protected  void doExportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, Element fileEntryElement)
           
protected  void doImportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, FileEntry importedFileEntry, Element fileEntryElement)
           
protected  void exportPreview(PortletDataContext portletDataContext, FileEntry fileEntry, Element fileEntryElement)
           
 void generateImages(FileVersion fileVersion)
           
 Set<String> getImageMimeTypes()
           
 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)
           
 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, doGetThumbnailAsStream, doGetThumbnailFileSize, exportBinary, exportGeneratedFiles, 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, hasPreview, hasPreviews, hasThumbnail, hasThumbnails, importGeneratedFiles, 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
 
Methods inherited from interface com.liferay.portlet.documentlibrary.util.ImageProcessor
exportGeneratedFiles, importGeneratedFiles
 

Constructor Detail

ImageProcessorImpl

public ImageProcessorImpl()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface DLProcessor

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

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

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

doExportGeneratedFiles

protected void doExportGeneratedFiles(PortletDataContext portletDataContext,
                                      FileEntry fileEntry,
                                      Element fileEntryElement)
                               throws Exception
Specified by:
doExportGeneratedFiles in class DLPreviewableProcessor
Throws:
Exception

doImportGeneratedFiles

protected void doImportGeneratedFiles(PortletDataContext portletDataContext,
                                      FileEntry fileEntry,
                                      FileEntry importedFileEntry,
                                      Element fileEntryElement)
                               throws Exception
Specified by:
doImportGeneratedFiles in class DLPreviewableProcessor
Throws:
Exception

exportPreview

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

Liferay 6.1.2-ce-ga3