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 AudioProcessor {
030
031 public static final String PREVIEW_TYPE = "mp3";
032
033 public void exportGeneratedFiles(
034 PortletDataContext portletDataContext, FileEntry fileEntry,
035 Element fileEntryElement)
036 throws Exception;
037
038 public void generateAudio(
039 FileVersion sourceFileVersion, FileVersion destinationFileVersion)
040 throws Exception;
041
042 public Set<String> getAudioMimeTypes();
043
044 public InputStream getPreviewAsStream(FileVersion fileVersion, String type)
045 throws Exception;
046
047 public long getPreviewFileSize(FileVersion fileVersion, String type)
048 throws Exception;
049
050 public boolean hasAudio(FileVersion fileVersion);
051
052 public void importGeneratedFiles(
053 PortletDataContext portletDataContext, FileEntry fileEntry,
054 FileEntry importedFileEntry, Element fileEntryElement)
055 throws Exception;
056
057 public boolean isAudioSupported(FileVersion fileVersion);
058
059 public boolean isAudioSupported(String mimeType);
060
061 public boolean isSupported(String mimeType);
062
063 public void trigger(
064 FileVersion sourceFileVersion, FileVersion destinationFileVersion);
065
066 }