com.liferay.portlet.documentlibrary.util
Class VideoProcessorImpl
java.lang.Object
com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor
com.liferay.portlet.documentlibrary.util.VideoProcessorImpl
- All Implemented Interfaces:
- DLProcessor, VideoProcessor
public class VideoProcessorImpl
- extends DLPreviewableProcessor
- implements VideoProcessor
|
Method Summary |
void |
afterPropertiesSet()
|
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 |
generateVideo(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
|
protected List<Long> |
getFileVersionIds()
|
InputStream |
getPreviewAsStream(FileVersion fileVersion,
String type)
|
long |
getPreviewFileSize(FileVersion fileVersion,
String type)
|
protected String |
getPreviewType(FileVersion fileVersion)
|
protected String[] |
getPreviewTypes()
|
InputStream |
getThumbnailAsStream(FileVersion fileVersion,
int index)
|
long |
getThumbnailFileSize(FileVersion fileVersion,
int index)
|
protected String |
getThumbnailType(FileVersion fileVersion)
|
String |
getType()
Returns the processor's type. |
Set<String> |
getVideoMimeTypes()
|
boolean |
hasVideo(FileVersion fileVersion)
|
protected void |
importPreviews(PortletDataContext portletDataContext,
FileEntry fileEntry,
FileEntry importedFileEntry,
Element fileEntryElement)
|
boolean |
isSupported(String mimeType)
Returns true if the given file MIME type is supported by
this processor. |
boolean |
isVideoSupported(FileVersion fileVersion)
|
boolean |
isVideoSupported(String mimeType)
|
protected void |
storeThumbnailImages(FileVersion fileVersion,
File file)
|
void |
trigger(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
Launches the processor's work with respect to the destination file
version. |
| Methods inherited from class com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor |
addFileToStore, addFileToStore, cleanUp, cleanUp, copy, copyPreviews, 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, getThumbnailFilePath, getThumbnailFilePath, getThumbnailFilePath, getThumbnailTempFile, getThumbnailTempFile, getThumbnailTempFilePath, getThumbnailTempFilePath, getThumbnailType, hasPreview, hasPreviews, hasThumbnail, hasThumbnails, importGeneratedFiles, importPreview, importPreview, importPreviewFromLAR, importThumbnail, importThumbnailFromLAR, importThumbnails, isSupported, isThumbnailEnabled, sendGenerationMessage, storeThumbnailImage, storeThumbnailImages |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VideoProcessorImpl
public VideoProcessorImpl()
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet in interface DLProcessor
generateVideo
public void generateVideo(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
throws Exception
- Specified by:
generateVideo 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,
String type)
throws Exception
- Specified by:
getPreviewFileSize in interface VideoProcessor
- Throws:
Exception
getThumbnailAsStream
public InputStream getThumbnailAsStream(FileVersion fileVersion,
int index)
throws Exception
- Specified by:
getThumbnailAsStream in interface VideoProcessor
- Throws:
Exception
getThumbnailFileSize
public long getThumbnailFileSize(FileVersion fileVersion,
int index)
throws Exception
- Specified by:
getThumbnailFileSize in interface VideoProcessor
- Throws:
Exception
getType
public String getType()
- Description copied from interface:
DLProcessor
- Returns the processor's type. See
DLProcessorConstants for the
set of predefined processor types.
- Specified by:
getType in interface DLProcessor
- Returns:
- the type of this processor
getVideoMimeTypes
public Set<String> getVideoMimeTypes()
- Specified by:
getVideoMimeTypes in interface VideoProcessor
hasVideo
public boolean hasVideo(FileVersion fileVersion)
- Specified by:
hasVideo in interface VideoProcessor
isSupported
public boolean isSupported(String mimeType)
- Description copied from interface:
DLProcessor
- Returns
true if the given file MIME type is supported by
this processor.
- Specified by:
isSupported in interface DLProcessor- Specified by:
isSupported in interface VideoProcessor
- Parameters:
mimeType - the MIME type
- Returns:
true if this processor supports the MIME type;
false otherwise
isVideoSupported
public boolean isVideoSupported(FileVersion fileVersion)
- Specified by:
isVideoSupported in interface VideoProcessor
isVideoSupported
public boolean isVideoSupported(String mimeType)
- Specified by:
isVideoSupported in interface VideoProcessor
trigger
public void trigger(FileVersion sourceFileVersion,
FileVersion destinationFileVersion)
- Description copied from interface:
DLProcessor
- Launches the processor's work with respect to the destination file
version.
- Specified by:
trigger in interface DLProcessor- Specified by:
trigger in interface VideoProcessor- 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
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
getPreviewTypes
protected String[] getPreviewTypes()
- Overrides:
getPreviewTypes 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
storeThumbnailImages
protected void storeThumbnailImages(FileVersion fileVersion,
File file)
throws Exception
- Overrides:
storeThumbnailImages in class DLPreviewableProcessor
- Throws:
Exception