public class PDFProcessorImpl extends DLPreviewableProcessor implements PDFProcessor
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_PATHPREVIEW_TYPE, THUMBNAIL_TYPE| Constructor and Description |
|---|
PDFProcessorImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
copyPreviews(FileVersion sourceFileVersion,
FileVersion destinationFileVersion) |
void |
destroy() |
protected void |
doExportGeneratedFiles(PortletDataContext portletDataContext,
FileEntry fileEntry,
Element fileEntryElement) |
protected void |
doImportGeneratedFiles(PortletDataContext portletDataContext,
FileEntry fileEntry,
FileEntry importedFileEntry,
Element fileEntryElement) |
protected void |
exportPreviews(PortletDataContext portletDataContext,
FileEntry fileEntry,
Element fileEntryElement) |
void |
generateImages(FileVersion sourceFileVersion,
FileVersion destinationFileVersion) |
protected java.util.List<java.lang.Long> |
getFileVersionIds() |
java.io.InputStream |
getPreviewAsStream(FileVersion fileVersion,
int index) |
int |
getPreviewFileCount(FileVersion fileVersion) |
long |
getPreviewFileSize(FileVersion fileVersion,
int index) |
protected java.lang.String |
getPreviewType(FileVersion fileVersion) |
java.io.InputStream |
getThumbnailAsStream(FileVersion fileVersion,
int index) |
long |
getThumbnailFileSize(FileVersion fileVersion,
int index) |
protected java.lang.String |
getThumbnailType(FileVersion fileVersion) |
java.lang.String |
getType()
Returns the processor's type.
|
boolean |
hasImages(FileVersion fileVersion) |
protected boolean |
hasPreview(FileVersion fileVersion) |
protected boolean |
hasPreview(FileVersion fileVersion,
java.lang.String type) |
protected void |
importPreviews(PortletDataContext portletDataContext,
FileEntry fileEntry,
FileEntry importedFileEntry,
Element fileEntryElement) |
boolean |
isDocumentSupported(FileVersion fileVersion) |
boolean |
isDocumentSupported(java.lang.String mimeType) |
boolean |
isSupported(java.lang.String mimeType)
Returns
true if the given file MIME type is supported by
this processor. |
void |
trigger(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
Launches the processor's work with respect to the destination file
version.
|
addFileToStore, addFileToStore, cleanUp, cleanUp, copy, 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, 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, importGeneratedFilespublic void afterPropertiesSet()
afterPropertiesSet in interface DLProcessorpublic void destroy()
destroy in interface DLProcessorpublic void generateImages(FileVersion sourceFileVersion, FileVersion destinationFileVersion) throws java.lang.Exception
generateImages in interface PDFProcessorjava.lang.Exceptionpublic java.io.InputStream getPreviewAsStream(FileVersion fileVersion, int index) throws java.lang.Exception
getPreviewAsStream in interface PDFProcessorjava.lang.Exceptionpublic int getPreviewFileCount(FileVersion fileVersion)
getPreviewFileCount in interface PDFProcessorpublic long getPreviewFileSize(FileVersion fileVersion, int index) throws java.lang.Exception
getPreviewFileSize in interface PDFProcessorjava.lang.Exceptionpublic java.io.InputStream getThumbnailAsStream(FileVersion fileVersion, int index) throws java.lang.Exception
getThumbnailAsStream in interface PDFProcessorjava.lang.Exceptionpublic long getThumbnailFileSize(FileVersion fileVersion, int index) throws java.lang.Exception
getThumbnailFileSize in interface PDFProcessorjava.lang.Exceptionpublic 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 PDFProcessorpublic boolean isDocumentSupported(FileVersion fileVersion)
isDocumentSupported in interface PDFProcessorpublic boolean isDocumentSupported(java.lang.String mimeType)
isDocumentSupported in interface PDFProcessorpublic boolean isSupported(java.lang.String mimeType)
DLProcessortrue if the given file MIME type is supported by
this processor.isSupported in interface DLProcessorisSupported in interface PDFProcessormimeType - the MIME typetrue if this processor supports the MIME type;
false otherwisepublic void trigger(FileVersion sourceFileVersion, FileVersion destinationFileVersion)
DLProcessortrigger in interface DLProcessortrigger in interface PDFProcessortrigger in class DLPreviewableProcessorsourceFileVersion - the file version to copy previews and thumbnails
from (optionally null)destinationFileVersion - the latest file version to processprotected void copyPreviews(FileVersion sourceFileVersion, FileVersion destinationFileVersion)
copyPreviews in class DLPreviewableProcessorprotected 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 exportPreviews(PortletDataContext portletDataContext, FileEntry fileEntry, Element fileEntryElement) throws java.lang.Exception
java.lang.Exceptionprotected java.util.List<java.lang.Long> getFileVersionIds()
getFileVersionIds in class DLPreviewableProcessorprotected java.lang.String getPreviewType(FileVersion fileVersion)
getPreviewType in class DLPreviewableProcessorprotected java.lang.String getThumbnailType(FileVersion fileVersion)
getThumbnailType in class DLPreviewableProcessorprotected boolean hasPreview(FileVersion fileVersion) throws java.lang.Exception
java.lang.Exceptionprotected boolean hasPreview(FileVersion fileVersion, java.lang.String type) throws java.lang.Exception
hasPreview in class DLPreviewableProcessorjava.lang.Exceptionprotected void importPreviews(PortletDataContext portletDataContext, FileEntry fileEntry, FileEntry importedFileEntry, Element fileEntryElement) throws java.lang.Exception
java.lang.Exception