Liferay 6.1.0-ce-b4

com.liferay.portlet.documentlibrary.util
Class PDFProcessor

java.lang.Object
  extended by com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor
      extended by com.liferay.portlet.documentlibrary.util.DefaultPreviewableProcessor
          extended by com.liferay.portlet.documentlibrary.util.PDFProcessor
All Implemented Interfaces:
DLProcessor

public class PDFProcessor
extends DefaultPreviewableProcessor


Field Summary
static String PREVIEW_TYPE
           
static String THUMBNAIL_TYPE
           
 
Fields inherited from class com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor
PREVIEW_PATH, PREVIEW_TMP_PATH, REPOSITORY_ID, THUMBNAIL_PATH, THUMBNAIL_TMP_PATH
 
Constructor Summary
PDFProcessor()
           
 
Method Summary
static void generateImages(FileVersion fileVersion)
           
static String getGlobalSearchPath()
           
static InputStream getPreviewAsStream(FileVersion fileVersion, int index)
           
static int getPreviewFileCount(FileVersion fileVersion)
           
static long getPreviewFileSize(FileVersion fileVersion, int index)
           
protected  String getPreviewType()
           
static InputStream getThumbnailAsStream(FileVersion fileVersion)
           
static long getThumbnailFileSize(FileVersion fileVersion)
           
protected  String getThumbnailType()
           
static boolean hasImages(FileVersion fileVersion)
           
static boolean isImageMagickEnabled()
           
 boolean isSupported(String mimeType)
           
static 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.DefaultPreviewableProcessor
cleanUp, cleanUp, doGetPreviewAsStream, doGetPreviewAsStream, doGetPreviewFileSize, doGetPreviewFileSize, doGetThumbnailAsStream, doGetThumbnailFileSize, getPreviewFilePath, getPreviewFilePath, getPreviewTempFile, getPreviewTempFile, getPreviewTempFileCount, getPreviewTempFilePath, getPreviewTempFilePath, getThumbnailFilePath, getThumbnailTempFile, getThumbnailTempFilePath
 
Methods inherited from class com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor
addFileToStore, deleteFiles, deleteFiles, deleteFiles, deleteFiles, doGetPreviewAsStream, doGetPreviewAsStream, doGetPreviewFileCount, doGetPreviewFileSize, doGetPreviewFileSize, doGetThumbnailAsStream, doGetThumbnailFileSize, getPathSegment, getPathSegment, getPreviewFilePath, getPreviewFilePath, getPreviewTempFile, getPreviewTempFile, getPreviewTempFileCount, getPreviewTempFilePath, getPreviewTempFilePath, getThumbnailFilePath, getThumbnailTempFile, getThumbnailTempFilePath, isSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREVIEW_TYPE

public static final String PREVIEW_TYPE
See Also:
Constant Field Values

THUMBNAIL_TYPE

public static final String THUMBNAIL_TYPE
See Also:
Constant Field Values
Constructor Detail

PDFProcessor

public PDFProcessor()
Method Detail

getGlobalSearchPath

public static String getGlobalSearchPath()
                                  throws Exception
Throws:
Exception

generateImages

public static void generateImages(FileVersion fileVersion)
                           throws Exception
Throws:
Exception

getPreviewAsStream

public static InputStream getPreviewAsStream(FileVersion fileVersion,
                                             int index)
                                      throws Exception
Throws:
Exception

getPreviewFileCount

public static int getPreviewFileCount(FileVersion fileVersion)

getPreviewFileSize

public static long getPreviewFileSize(FileVersion fileVersion,
                                      int index)
                               throws Exception
Throws:
Exception

getThumbnailAsStream

public static InputStream getThumbnailAsStream(FileVersion fileVersion)
                                        throws Exception
Throws:
Exception

getThumbnailFileSize

public static long getThumbnailFileSize(FileVersion fileVersion)
                                 throws Exception
Throws:
Exception

hasImages

public static boolean hasImages(FileVersion fileVersion)

isImageMagickEnabled

public static boolean isImageMagickEnabled()
                                    throws Exception
Throws:
Exception

reset

public static void reset()
                  throws Exception
Throws:
Exception

isSupported

public boolean isSupported(String mimeType)

trigger

public void trigger(FileVersion fileVersion)
Description copied from interface: DLProcessor
Launches the processor's work with respect to the given file version.

Parameters:
fileVersion - the latest file version to process

getPreviewType

protected String getPreviewType()
Specified by:
getPreviewType in class DefaultPreviewableProcessor

getThumbnailType

protected String getThumbnailType()
Overrides:
getThumbnailType in class DefaultPreviewableProcessor

Liferay 6.1.0-ce-b4