Liferay 7.0-ga1 portal-impl

com.liferay.portlet.documentlibrary.util
Class ImageProcessorImpl

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

public class ImageProcessorImpl
extends com.liferay.document.library.kernel.util.DLPreviewableProcessor
implements com.liferay.document.library.kernel.util.ImageProcessor


Field Summary
 
Fields inherited from class com.liferay.document.library.kernel.util.DLPreviewableProcessor
futures, 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(com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
           
 void cleanUp(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
           
protected  void doExportGeneratedFiles(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext, com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.xml.Element fileEntryElement)
           
protected  void doImportGeneratedFiles(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext, com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.repository.model.FileEntry importedFileEntry, com.liferay.portal.kernel.xml.Element fileEntryElement)
           
protected  void exportPreview(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext, com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.xml.Element fileEntryElement)
           
 void generateImages(com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion, com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion)
           
protected  List<Long> getFileVersionIds()
           
 Set<String> getImageMimeTypes()
           
 InputStream getPreviewAsStream(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
           
 long getPreviewFileSize(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
           
 String getPreviewType(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
           
 InputStream getThumbnailAsStream(com.liferay.portal.kernel.repository.model.FileVersion fileVersion, int index)
           
 long getThumbnailFileSize(com.liferay.portal.kernel.repository.model.FileVersion fileVersion, int index)
           
 String getThumbnailType(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
           
 String getType()
           
 boolean hasImages(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
           
 boolean isImageSupported(com.liferay.portal.kernel.repository.model.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(com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion, com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion)
           
 
Methods inherited from class com.liferay.document.library.kernel.util.DLPreviewableProcessor
addFileToStore, addFileToStore, copy, copyPreviews, copyThumbnail, copyThumbnails, deleteFiles, deleteFiles, deleteFiles, deleteFiles, deletePreviews, deleteThumbnail, deleteThumbnails, destroyProcess, doGetPreviewAsStream, doGetPreviewAsStream, doGetPreviewFileCount, doGetPreviewFileSize, doGetPreviewFileSize, doGetPreviewFileSize, doGetThumbnailAsStream, doGetThumbnailFileSize, exportBinary, exportGeneratedFiles, exportPreview, exportPreview, exportThumbnail, exportThumbnails, getBinPath, getBinPath, getPathSegment, getPathSegment, getPreviewFilePath, getPreviewFilePath, getPreviewFilePath, getPreviewFilePath, getPreviewFilePath, getPreviewFilePath, getPreviewTempFile, getPreviewTempFile, getPreviewTempFile, getPreviewTempFile, getPreviewTempFileCount, getPreviewTempFileCount, getPreviewTempFilePath, getPreviewTempFilePath, getPreviewTempFilePath, getPreviewTempFilePath, getPreviewType, getPreviewType, getPreviewTypes, getThumbnailFilePath, getThumbnailFilePath, getThumbnailFilePath, getThumbnailTempFile, getThumbnailTempFile, getThumbnailTempFilePath, getThumbnailTempFilePath, getThumbnailType, hasPreview, hasPreviews, hasThumbnail, hasThumbnails, importGeneratedFiles, importPreview, importPreview, importPreviewFromLAR, importThumbnail, importThumbnailFromLAR, importThumbnails, isSupported, isThumbnailEnabled, sendGenerationMessage, storeThumbnailImage, storeThumbnailImages, storeThumbnailImages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.liferay.document.library.kernel.util.ImageProcessor
exportGeneratedFiles, importGeneratedFiles
 

Constructor Detail

ImageProcessorImpl

public ImageProcessorImpl()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface com.liferay.document.library.kernel.util.DLProcessor

cleanUp

public void cleanUp(com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
Specified by:
cleanUp in interface com.liferay.document.library.kernel.util.DLProcessor
Specified by:
cleanUp in interface com.liferay.document.library.kernel.util.ImageProcessor
Overrides:
cleanUp in class com.liferay.document.library.kernel.util.DLPreviewableProcessor

cleanUp

public void cleanUp(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
Specified by:
cleanUp in interface com.liferay.document.library.kernel.util.DLProcessor
Specified by:
cleanUp in interface com.liferay.document.library.kernel.util.ImageProcessor
Overrides:
cleanUp in class com.liferay.document.library.kernel.util.DLPreviewableProcessor

generateImages

public void generateImages(com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
                           com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion)
                    throws Exception
Specified by:
generateImages in interface com.liferay.document.library.kernel.util.ImageProcessor
Throws:
Exception

getImageMimeTypes

public Set<String> getImageMimeTypes()
Specified by:
getImageMimeTypes in interface com.liferay.document.library.kernel.util.ImageProcessor

getPreviewAsStream

public InputStream getPreviewAsStream(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
                               throws Exception
Specified by:
getPreviewAsStream in interface com.liferay.document.library.kernel.util.ImageProcessor
Throws:
Exception

getPreviewFileSize

public long getPreviewFileSize(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
                        throws Exception
Specified by:
getPreviewFileSize in interface com.liferay.document.library.kernel.util.ImageProcessor
Throws:
Exception

getPreviewType

public String getPreviewType(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
Specified by:
getPreviewType in interface com.liferay.document.library.kernel.util.ImageProcessor
Specified by:
getPreviewType in class com.liferay.document.library.kernel.util.DLPreviewableProcessor

getThumbnailAsStream

public InputStream getThumbnailAsStream(com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
                                        int index)
                                 throws Exception
Specified by:
getThumbnailAsStream in interface com.liferay.document.library.kernel.util.ImageProcessor
Throws:
Exception

getThumbnailFileSize

public long getThumbnailFileSize(com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
                                 int index)
                          throws Exception
Specified by:
getThumbnailFileSize in interface com.liferay.document.library.kernel.util.ImageProcessor
Throws:
Exception

getThumbnailType

public String getThumbnailType(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
Specified by:
getThumbnailType in interface com.liferay.document.library.kernel.util.ImageProcessor
Specified by:
getThumbnailType in class com.liferay.document.library.kernel.util.DLPreviewableProcessor

getType

public String getType()
Specified by:
getType in interface com.liferay.document.library.kernel.util.DLProcessor

hasImages

public boolean hasImages(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
Specified by:
hasImages in interface com.liferay.document.library.kernel.util.ImageProcessor

isImageSupported

public boolean isImageSupported(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
Specified by:
isImageSupported in interface com.liferay.document.library.kernel.util.ImageProcessor

isImageSupported

public boolean isImageSupported(String mimeType)
Specified by:
isImageSupported in interface com.liferay.document.library.kernel.util.ImageProcessor

isSupported

public boolean isSupported(String mimeType)
Specified by:
isSupported in interface com.liferay.document.library.kernel.util.DLProcessor
Specified by:
isSupported in interface com.liferay.document.library.kernel.util.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 com.liferay.document.library.kernel.util.ImageProcessor
Throws:
Exception

trigger

public void trigger(com.liferay.portal.kernel.repository.model.FileVersion sourceFileVersion,
                    com.liferay.portal.kernel.repository.model.FileVersion destinationFileVersion)
Specified by:
trigger in interface com.liferay.document.library.kernel.util.DLProcessor
Specified by:
trigger in interface com.liferay.document.library.kernel.util.ImageProcessor
Overrides:
trigger in class com.liferay.document.library.kernel.util.DLPreviewableProcessor

doExportGeneratedFiles

protected void doExportGeneratedFiles(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
                                      com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                                      com.liferay.portal.kernel.xml.Element fileEntryElement)
                               throws Exception
Specified by:
doExportGeneratedFiles in class com.liferay.document.library.kernel.util.DLPreviewableProcessor
Throws:
Exception

doImportGeneratedFiles

protected void doImportGeneratedFiles(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
                                      com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                                      com.liferay.portal.kernel.repository.model.FileEntry importedFileEntry,
                                      com.liferay.portal.kernel.xml.Element fileEntryElement)
                               throws Exception
Specified by:
doImportGeneratedFiles in class com.liferay.document.library.kernel.util.DLPreviewableProcessor
Throws:
Exception

exportPreview

protected void exportPreview(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
                             com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                             com.liferay.portal.kernel.xml.Element fileEntryElement)
                      throws Exception
Throws:
Exception

getFileVersionIds

protected List<Long> getFileVersionIds()
Specified by:
getFileVersionIds in class com.liferay.document.library.kernel.util.DLPreviewableProcessor

Liferay 7.0-ga1 portal-impl