Class MediaProcessor
java.lang.Object
org.silverpeas.components.gallery.MediaProcessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MediaProcessorget()voidpasteInternalMedia(org.silverpeas.core.process.io.file.FileHandler fileHandler, MediaPK fromPK, InternalMedia media, boolean cut) Pastes media from a source to a destination.voidprocessPhoto(org.silverpeas.core.process.io.file.FileHandler fileHandler, Photo photo, File image, Watermark watermark) Saves uploaded photo file on file system with associated thumbnails and watermarks.voidprocessPhoto(org.silverpeas.core.process.io.file.FileHandler fileHandler, Photo photo, org.silverpeas.core.util.file.FileItem image, Watermark watermark) Saves uploaded photo file on file system with associated thumbnails and watermarks.voidprocessSound(org.silverpeas.core.process.io.file.FileHandler fileHandler, Sound sound, File uploadedFile) Saves uploaded sound file on file system (In case of drag And Drop upload)voidprocessSound(org.silverpeas.core.process.io.file.FileHandler fileHandler, Sound sound, org.silverpeas.core.util.file.FileItem fileItem) Saves uploaded sound file on file systemvoidprocessVideo(org.silverpeas.core.process.io.file.FileHandler fileHandler, Video video, File uploadedFile) Saves uploaded video file on file system (In case of drag And Drop upload)voidprocessVideo(org.silverpeas.core.process.io.file.FileHandler fileHandler, Video video, org.silverpeas.core.util.file.FileItem fileItem) Saves uploaded video file on file system and generates a thumbnail for the video.
-
Constructor Details
-
MediaProcessor
public MediaProcessor()
-
-
Method Details
-
get
-
processSound
public void processSound(org.silverpeas.core.process.io.file.FileHandler fileHandler, Sound sound, org.silverpeas.core.util.file.FileItem fileItem) throws Exception Saves uploaded sound file on file system- Parameters:
fileHandler- the current session file handlersound- the current sound mediafileItem- the current uploaded sound- Throws:
Exception- if the process fails.
-
processSound
public void processSound(org.silverpeas.core.process.io.file.FileHandler fileHandler, Sound sound, File uploadedFile) throws Exception Saves uploaded sound file on file system (In case of drag And Drop upload)- Parameters:
fileHandler- the current session file handlersound- the current sound mediauploadedFile- the current uploaded sound- Throws:
Exception- if an error occurs while saving the sound file.
-
processVideo
public void processVideo(org.silverpeas.core.process.io.file.FileHandler fileHandler, Video video, org.silverpeas.core.util.file.FileItem fileItem) throws Exception Saves uploaded video file on file system and generates a thumbnail for the video.- Parameters:
fileHandler- the current session file handlervideo- the current video mediafileItem- the current uploaded video- Throws:
Exception- if an error occurs while saving the video file.
-
processVideo
public void processVideo(org.silverpeas.core.process.io.file.FileHandler fileHandler, Video video, File uploadedFile) throws Exception Saves uploaded video file on file system (In case of drag And Drop upload)- Parameters:
fileHandler- the current session file handlervideo- the current video mediauploadedFile- the current uploaded video- Throws:
Exception- if an error occurs while saving the video file.
-
processPhoto
public void processPhoto(org.silverpeas.core.process.io.file.FileHandler fileHandler, Photo photo, org.silverpeas.core.util.file.FileItem image, Watermark watermark) throws Exception Saves uploaded photo file on file system with associated thumbnails and watermarks. -
processPhoto
public void processPhoto(org.silverpeas.core.process.io.file.FileHandler fileHandler, Photo photo, File image, Watermark watermark) throws Exception Saves uploaded photo file on file system with associated thumbnails and watermarks. (In case of drag And Drop upload) -
pasteInternalMedia
public void pasteInternalMedia(org.silverpeas.core.process.io.file.FileHandler fileHandler, MediaPK fromPK, InternalMedia media, boolean cut) Pastes media from a source to a destination.- Parameters:
fileHandler- the file handler (space quota management).fromPK- the source.media- the destination.cut- true if it is a cut operation, false if it is a copy one.
-