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 |
exportGeneratedFiles(PortletDataContext portletDataContext,
FileEntry fileEntry,
Element fileEntryElement)
|
protected void |
exportPreviews(PortletDataContext portletDataContext,
FileEntry fileEntry,
Element fileEntryElement)
|
void |
generateImages(FileVersion fileVersion)
|
String |
getGlobalSearchPath()
|
static PDFProcessorImpl |
getInstance()
|
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)
|
void |
importGeneratedFiles(PortletDataContext portletDataContext,
FileEntry fileEntry,
FileEntry importedFileEntry,
Element fileEntryElement)
|
protected void |
importPreviews(PortletDataContext portletDataContext,
FileEntry fileEntry,
FileEntry importedFileEntry,
Element fileEntryElement)
|
protected void |
initialize()
|
boolean |
isDocumentSupported(FileVersion fileVersion)
|
boolean |
isDocumentSupported(String mimeType)
|
boolean |
isImageMagickEnabled()
|
boolean |
isSupported(String mimeType)
|
void |
reset()
|
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, cleanUp, cleanUp, deleteFiles, deleteFiles, deleteFiles, deleteFiles, doGetPreviewAsStream, doGetPreviewAsStream, doGetPreviewFileCount, doGetPreviewFileSize, doGetPreviewFileSize, doGetPreviewFileSize, doGetThumbnail, doGetThumbnailAsStream, doGetThumbnailFileSize, exportBinary, exportBinary, 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, hasThumbnail, hasThumbnails, 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 |
getInstance
public static PDFProcessorImpl getInstance()
exportGeneratedFiles
public void exportGeneratedFiles(PortletDataContext portletDataContext,
FileEntry fileEntry,
Element fileEntryElement)
throws Exception
- Specified by:
exportGeneratedFiles
in interface DLProcessor
- Specified by:
exportGeneratedFiles
in interface PDFProcessor
- Throws:
Exception
generateImages
public void generateImages(FileVersion fileVersion)
throws Exception
- Specified by:
generateImages
in interface PDFProcessor
- Throws:
Exception
getGlobalSearchPath
public String getGlobalSearchPath()
throws Exception
- Specified by:
getGlobalSearchPath
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
importGeneratedFiles
public void importGeneratedFiles(PortletDataContext portletDataContext,
FileEntry fileEntry,
FileEntry importedFileEntry,
Element fileEntryElement)
throws Exception
- Specified by:
importGeneratedFiles
in interface DLProcessor
- Specified by:
importGeneratedFiles
in interface PDFProcessor
- Throws:
Exception
isDocumentSupported
public boolean isDocumentSupported(FileVersion fileVersion)
- Specified by:
isDocumentSupported
in interface PDFProcessor
isDocumentSupported
public boolean isDocumentSupported(String mimeType)
- Specified by:
isDocumentSupported
in interface PDFProcessor
isImageMagickEnabled
public boolean isImageMagickEnabled()
throws Exception
- Specified by:
isImageMagickEnabled
in interface PDFProcessor
- Throws:
Exception
isSupported
public boolean isSupported(String mimeType)
- Specified by:
isSupported
in interface DLProcessor
- Specified by:
isSupported
in interface PDFProcessor
reset
public void reset()
throws Exception
- Specified by:
reset
in interface PDFProcessor
- 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 PDFProcessor
- Parameters:
fileVersion
- the latest file version to process
exportPreviews
protected void exportPreviews(PortletDataContext portletDataContext,
FileEntry fileEntry,
Element fileEntryElement)
throws Exception
- Throws:
Exception
getPreviewType
protected String getPreviewType(FileVersion fileVersion)
- Specified by:
getPreviewType
in class DLPreviewableProcessor
getThumbnailType
protected String getThumbnailType(FileVersion fileVersion)
- Specified by:
getThumbnailType
in class DLPreviewableProcessor
importPreviews
protected void importPreviews(PortletDataContext portletDataContext,
FileEntry fileEntry,
FileEntry importedFileEntry,
Element fileEntryElement)
throws Exception
- Throws:
Exception
initialize
protected void initialize()