001
014
015 package com.liferay.portlet.documentlibrary.util;
016
017 import com.liferay.portal.kernel.lar.PortletDataContext;
018 import com.liferay.portal.kernel.repository.model.FileEntry;
019 import com.liferay.portal.kernel.repository.model.FileVersion;
020 import com.liferay.portal.kernel.xml.Element;
021
022 import java.io.InputStream;
023
024 import java.util.Set;
025
026
029 public interface VideoProcessor {
030
031 public static final String THUMBNAIL_TYPE = "jpg";
032
033 public void exportGeneratedFiles(
034 PortletDataContext portletDataContext, FileEntry fileEntry,
035 Element fileEntryElement)
036 throws Exception;
037
038 public void generateVideo(FileVersion fileVersion) throws Exception;
039
040 public InputStream getPreviewAsStream(FileVersion fileVersion, String type)
041 throws Exception;
042
043 public long getPreviewFileSize(FileVersion fileVersion, String type)
044 throws Exception;
045
046 public InputStream getThumbnailAsStream(FileVersion fileVersion, int index)
047 throws Exception;
048
049 public long getThumbnailFileSize(FileVersion fileVersion, int index)
050 throws Exception;
051
052 public Set<String> getVideoMimeTypes();
053
054 public boolean hasVideo(FileVersion fileVersion);
055
056 public void importGeneratedFiles(
057 PortletDataContext portletDataContext, FileEntry fileEntry,
058 FileEntry importedFileEntry, Element fileEntryElement)
059 throws Exception;
060
061 public boolean isSupported(String mimeType);
062
063 public boolean isVideoSupported(FileVersion fileVersion);
064
065 public boolean isVideoSupported(String mimeType);
066
067 public void trigger(FileVersion fileVersion);
068
069 }