public class ImageProcessorImpl extends DLPreviewableProcessor implements ImageProcessor
DECRYPT_PATH, DECRYPT_TMP_PATH, futures, PREVIEW_PATH, PREVIEW_TMP_PATH, REPOSITORY_ID, THUMBNAIL_INDEX_CUSTOM_1, THUMBNAIL_INDEX_CUSTOM_2, THUMBNAIL_INDEX_DEFAULT, THUMBNAIL_PATH, THUMBNAIL_TMP_PATH, TMP_PATH| Constructor and Description |
|---|
ImageProcessorImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
cleanUp(FileEntry fileEntry)
Cleans up any resources that the processor created for the file entry.
|
void |
cleanUp(FileVersion fileVersion)
Cleans up any resources that the processor created for the given file
version.
|
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 sourceFileVersion,
FileVersion destinationFileVersion) |
protected java.util.List<java.lang.Long> |
getFileVersionIds() |
java.util.Set<java.lang.String> |
getImageMimeTypes() |
java.io.InputStream |
getPreviewAsStream(FileVersion fileVersion) |
long |
getPreviewFileSize(FileVersion fileVersion) |
java.lang.String |
getPreviewType(FileVersion fileVersion) |
java.io.InputStream |
getThumbnailAsStream(FileVersion fileVersion,
int index) |
long |
getThumbnailFileSize(FileVersion fileVersion,
int index) |
java.lang.String |
getThumbnailType(FileVersion fileVersion) |
java.lang.String |
getType()
Returns the processor's type.
|
boolean |
hasImages(FileVersion fileVersion) |
boolean |
isImageSupported(FileVersion fileVersion) |
boolean |
isImageSupported(java.lang.String mimeType) |
boolean |
isSupported(java.lang.String mimeType)
Returns
true if the given file MIME type is supported by
this processor. |
void |
storeThumbnail(long companyId,
long groupId,
long fileEntryId,
long fileVersionId,
long custom1ImageId,
long custom2ImageId,
java.io.InputStream inputStream,
java.lang.String type) |
void |
trigger(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
Launches the processor's work with respect to the destination file
version.
|
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, getDecryptedTempFile, 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, storeThumbnailImagesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexportGeneratedFiles, importGeneratedFilesdestroypublic void afterPropertiesSet()
afterPropertiesSet in interface DLProcessorpublic void cleanUp(FileEntry fileEntry)
DLProcessorcleanUp in interface DLProcessorcleanUp in interface ImageProcessorcleanUp in class DLPreviewableProcessorfileEntry - the file entry for which resources are cleaned uppublic void cleanUp(FileVersion fileVersion)
DLProcessorDLProcessor.cleanUp(FileEntry)
if you want to clean up everything.cleanUp in interface DLProcessorcleanUp in interface ImageProcessorcleanUp in class DLPreviewableProcessorfileVersion - the file version for which resources will be cleaned
uppublic void generateImages(FileVersion sourceFileVersion, FileVersion destinationFileVersion) throws java.lang.Exception
generateImages in interface ImageProcessorjava.lang.Exceptionpublic java.util.Set<java.lang.String> getImageMimeTypes()
getImageMimeTypes in interface ImageProcessorpublic java.io.InputStream getPreviewAsStream(FileVersion fileVersion) throws java.lang.Exception
getPreviewAsStream in interface ImageProcessorjava.lang.Exceptionpublic long getPreviewFileSize(FileVersion fileVersion) throws java.lang.Exception
getPreviewFileSize in interface ImageProcessorjava.lang.Exceptionpublic java.lang.String getPreviewType(FileVersion fileVersion)
getPreviewType in interface ImageProcessorgetPreviewType in class DLPreviewableProcessorpublic java.io.InputStream getThumbnailAsStream(FileVersion fileVersion, int index) throws java.lang.Exception
getThumbnailAsStream in interface ImageProcessorjava.lang.Exceptionpublic long getThumbnailFileSize(FileVersion fileVersion, int index) throws java.lang.Exception
getThumbnailFileSize in interface ImageProcessorjava.lang.Exceptionpublic java.lang.String getThumbnailType(FileVersion fileVersion)
getThumbnailType in interface ImageProcessorgetThumbnailType in class DLPreviewableProcessorpublic java.lang.String getType()
DLProcessorcom.liferay.portlet.documentlibrary.model.DLProcessorConstants for the
set of predefined processor types.getType in interface DLProcessorpublic boolean hasImages(FileVersion fileVersion)
hasImages in interface ImageProcessorpublic boolean isImageSupported(FileVersion fileVersion)
isImageSupported in interface ImageProcessorpublic boolean isImageSupported(java.lang.String mimeType)
isImageSupported in interface ImageProcessorpublic boolean isSupported(java.lang.String mimeType)
DLProcessortrue if the given file MIME type is supported by
this processor.isSupported in interface DLProcessorisSupported in interface ImageProcessormimeType - the MIME typetrue if this processor supports the MIME type;
false otherwisepublic void storeThumbnail(long companyId,
long groupId,
long fileEntryId,
long fileVersionId,
long custom1ImageId,
long custom2ImageId,
java.io.InputStream inputStream,
java.lang.String type)
throws java.lang.Exception
storeThumbnail in interface ImageProcessorjava.lang.Exceptionpublic void trigger(FileVersion sourceFileVersion, FileVersion destinationFileVersion)
DLProcessortrigger in interface DLProcessortrigger in interface ImageProcessortrigger in class DLPreviewableProcessorsourceFileVersion - the file version to copy previews and thumbnails
from (optionally null)destinationFileVersion - the latest file version to processprotected void doExportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, Element fileEntryElement) throws java.lang.Exception
doExportGeneratedFiles in class DLPreviewableProcessorjava.lang.Exceptionprotected void doImportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, FileEntry importedFileEntry, Element fileEntryElement) throws java.lang.Exception
doImportGeneratedFiles in class DLPreviewableProcessorjava.lang.Exceptionprotected void exportPreview(PortletDataContext portletDataContext, FileEntry fileEntry, Element fileEntryElement) throws java.lang.Exception
java.lang.Exceptionprotected java.util.List<java.lang.Long> getFileVersionIds()
getFileVersionIds in class DLPreviewableProcessor