com.liferay.portlet.documentlibrary.util
Class PDFProcessorImpl
java.lang.Object
com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor
com.liferay.portlet.documentlibrary.util.PDFProcessorImpl
- All Implemented Interfaces:
- DLProcessor, PDFProcessor
public class PDFProcessorImpl
- extends DLPreviewableProcessor
- implements PDFProcessor
Method Summary |
void |
afterPropertiesSet()
|
protected void |
copyPreviews(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
|
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 List<Long> |
getFileVersionIds()
|
InputStream |
getPreviewAsStream(FileVersion fileVersion,
int index)
|
int |
getPreviewFileCount(FileVersion fileVersion)
|
long |
getPreviewFileSize(FileVersion fileVersion,
int index)
|
protected String |
getPreviewType(FileVersion fileVersion)
|
InputStream |
getThumbnailAsStream(FileVersion fileVersion,
int index)
|
long |
getThumbnailFileSize(FileVersion fileVersion,
int index)
|
protected String |
getThumbnailType(FileVersion fileVersion)
|
boolean |
hasImages(FileVersion fileVersion)
|
protected boolean |
hasPreview(FileVersion fileVersion)
|
protected boolean |
hasPreview(FileVersion fileVersion,
String type)
|
protected void |
importPreviews(PortletDataContext portletDataContext,
FileEntry fileEntry,
FileEntry importedFileEntry,
Element fileEntryElement)
|
boolean |
isDocumentSupported(FileVersion fileVersion)
|
boolean |
isDocumentSupported(String mimeType)
|
boolean |
isSupported(String mimeType)
|
void |
trigger(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
Launches the processor's work with respect to the given file version. |
Methods inherited from class com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor |
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, 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, storeThumbnailImages |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PDFProcessorImpl
public PDFProcessorImpl()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface DLProcessor
- Throws:
Exception
generateImages
public void generateImages(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
throws Exception
- Specified by:
generateImages
in interface PDFProcessor
- Throws:
Exception
getPreviewAsStream
public InputStream getPreviewAsStream(FileVersion fileVersion,
int index)
throws Exception
- Specified by:
getPreviewAsStream
in interface PDFProcessor
- Throws:
Exception
getPreviewFileCount
public int getPreviewFileCount(FileVersion fileVersion)
- Specified by:
getPreviewFileCount
in interface PDFProcessor
getPreviewFileSize
public long getPreviewFileSize(FileVersion fileVersion,
int index)
throws Exception
- Specified by:
getPreviewFileSize
in interface PDFProcessor
- Throws:
Exception
getThumbnailAsStream
public InputStream getThumbnailAsStream(FileVersion fileVersion,
int index)
throws Exception
- Specified by:
getThumbnailAsStream
in interface PDFProcessor
- Throws:
Exception
getThumbnailFileSize
public long getThumbnailFileSize(FileVersion fileVersion,
int index)
throws Exception
- Specified by:
getThumbnailFileSize
in interface PDFProcessor
- Throws:
Exception
hasImages
public boolean hasImages(FileVersion fileVersion)
- Specified by:
hasImages
in interface PDFProcessor
isDocumentSupported
public boolean isDocumentSupported(FileVersion fileVersion)
- Specified by:
isDocumentSupported
in interface PDFProcessor
isDocumentSupported
public boolean isDocumentSupported(String mimeType)
- Specified by:
isDocumentSupported
in interface PDFProcessor
isSupported
public boolean isSupported(String mimeType)
- Specified by:
isSupported
in interface DLProcessor
- Specified by:
isSupported
in interface PDFProcessor
trigger
public void trigger(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
- 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 PDFProcessor
- Overrides:
trigger
in class DLPreviewableProcessor
- Parameters:
sourceFileVersion
- the file version to copy previews and thumbnails
from (optionally null
)destinationFileVersion
- the latest file version to process
copyPreviews
protected void copyPreviews(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
- Overrides:
copyPreviews
in class DLPreviewableProcessor
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
exportPreviews
protected void exportPreviews(PortletDataContext portletDataContext,
FileEntry fileEntry,
Element fileEntryElement)
throws Exception
- Throws:
Exception
getFileVersionIds
protected List<Long> getFileVersionIds()
- Specified by:
getFileVersionIds
in class DLPreviewableProcessor
getPreviewType
protected String getPreviewType(FileVersion fileVersion)
- Specified by:
getPreviewType
in class DLPreviewableProcessor
getThumbnailType
protected String getThumbnailType(FileVersion fileVersion)
- Specified by:
getThumbnailType
in class DLPreviewableProcessor
hasPreview
protected boolean hasPreview(FileVersion fileVersion)
throws Exception
- Throws:
Exception
hasPreview
protected boolean hasPreview(FileVersion fileVersion,
String type)
throws Exception
- Overrides:
hasPreview
in class DLPreviewableProcessor
- Throws:
Exception
importPreviews
protected void importPreviews(PortletDataContext portletDataContext,
FileEntry fileEntry,
FileEntry importedFileEntry,
Element fileEntryElement)
throws Exception
- Throws:
Exception