Liferay 6.1.0-ce-ga1

com.liferay.portlet.documentlibrary.util
Class VideoProcessorImpl

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.VideoProcessorImpl
All Implemented Interfaces:
DLProcessor, VideoProcessor

public class VideoProcessorImpl
extends DefaultPreviewableProcessor
implements VideoProcessor


Field Summary
 
Fields inherited from class com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor
PREVIEW_PATH, PREVIEW_TMP_PATH, REPOSITORY_ID, THUMBNAIL_INDEX_CUSTOM_1, THUMBNAIL_INDEX_CUSTOM_2, THUMBNAIL_INDEX_DEFAULT, THUMBNAIL_PATH, THUMBNAIL_TMP_PATH
 
Fields inherited from interface com.liferay.portlet.documentlibrary.util.VideoProcessor
THUMBNAIL_TYPE
 
Method Summary
 void generateVideo(FileVersion fileVersion)
           
static VideoProcessorImpl getInstance()
           
 InputStream getPreviewAsStream(FileVersion fileVersion)
           
 InputStream getPreviewAsStream(FileVersion fileVersion, String type)
           
 long getPreviewFileSize(FileVersion fileVersion)
           
 long getPreviewFileSize(FileVersion fileVersion, String type)
           
protected  String getPreviewType(FileVersion fileVersion)
           
protected  String[] getPreviewTypes()
           
 InputStream getThumbnailAsStream(FileVersion fileVersion, int thumbnailIndex)
           
 long getThumbnailFileSize(FileVersion fileVersion, int thumbnailIndex)
           
protected  String getThumbnailType(FileVersion fileVersion)
           
 Set<String> getVideoMimeTypes()
           
 boolean hasVideo(FileVersion fileVersion)
           
 boolean isSupported(String mimeType)
           
 boolean isVideoSupported(FileVersion fileVersion)
           
 boolean isVideoSupported(String mimeType)
           
protected  void storeThumbnailImages(FileVersion fileVersion, File file)
           
 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, getPreviewFilePath, getPreviewFilePath, getPreviewTempFile, getPreviewTempFile, getPreviewTempFileCount, getPreviewTempFilePath, getPreviewTempFilePath, getPreviewType, getPreviewType, getThumbnailFilePath, getThumbnailTempFile, getThumbnailTempFilePath, getThumbnailType
 
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, hasThumbnail, isCustomThumbnailsEnabled, isSupported, storeThumbnailImages, storeThumbnailmage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static VideoProcessorImpl getInstance()

generateVideo

public void generateVideo(FileVersion fileVersion)
                   throws Exception
Specified by:
generateVideo in interface VideoProcessor
Throws:
Exception

getPreviewAsStream

public InputStream getPreviewAsStream(FileVersion fileVersion)
                               throws Exception
Specified by:
getPreviewAsStream in interface VideoProcessor
Throws:
Exception

getPreviewAsStream

public InputStream getPreviewAsStream(FileVersion fileVersion,
                                      String type)
                               throws Exception
Specified by:
getPreviewAsStream in interface VideoProcessor
Throws:
Exception

getPreviewFileSize

public long getPreviewFileSize(FileVersion fileVersion)
                        throws Exception
Specified by:
getPreviewFileSize in interface VideoProcessor
Throws:
Exception

getPreviewFileSize

public long getPreviewFileSize(FileVersion fileVersion,
                               String type)
                        throws Exception
Specified by:
getPreviewFileSize in interface VideoProcessor
Throws:
Exception

getThumbnailAsStream

public InputStream getThumbnailAsStream(FileVersion fileVersion,
                                        int thumbnailIndex)
                                 throws Exception
Specified by:
getThumbnailAsStream in interface VideoProcessor
Throws:
Exception

getThumbnailFileSize

public long getThumbnailFileSize(FileVersion fileVersion,
                                 int thumbnailIndex)
                          throws Exception
Specified by:
getThumbnailFileSize in interface VideoProcessor
Throws:
Exception

getVideoMimeTypes

public Set<String> getVideoMimeTypes()
Specified by:
getVideoMimeTypes in interface VideoProcessor

hasVideo

public boolean hasVideo(FileVersion fileVersion)
Specified by:
hasVideo in interface VideoProcessor

isVideoSupported

public boolean isVideoSupported(FileVersion fileVersion)
Specified by:
isVideoSupported in interface VideoProcessor

isVideoSupported

public boolean isVideoSupported(String mimeType)
Specified by:
isVideoSupported in interface VideoProcessor

isSupported

public boolean isSupported(String mimeType)
Specified by:
isSupported in interface DLProcessor
Specified by:
isSupported in interface VideoProcessor

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 VideoProcessor
Parameters:
fileVersion - the latest file version to process

getPreviewType

protected String getPreviewType(FileVersion fileVersion)
Specified by:
getPreviewType in class DLPreviewableProcessor

getPreviewTypes

protected String[] getPreviewTypes()
Overrides:
getPreviewTypes in class DefaultPreviewableProcessor

getThumbnailType

protected String getThumbnailType(FileVersion fileVersion)
Specified by:
getThumbnailType in class DLPreviewableProcessor

storeThumbnailImages

protected void storeThumbnailImages(FileVersion fileVersion,
                                    File file)
                             throws Exception
Overrides:
storeThumbnailImages in class DLPreviewableProcessor
Throws:
Exception

Liferay 6.1.0-ce-ga1