Class MediaTracksHandler

All Implemented Interfaces:
JcmsConstants, JaliosConstants

public class MediaTracksHandler extends JcmsFormHandler
Provide Media tracks management
Since:
10.0.5 / JCMS-8221
  • Field Details

    • supportedTrackExtensions

      protected final Set<String> supportedTrackExtensions
    • supportedTrackMimeTypes

      protected final Set<String> supportedTrackMimeTypes
    • opUpdate

      protected boolean opUpdate
    • media

      protected FileDocument media
    • deletedTracks

      protected Set<File> deletedTracks
    • uploadedTracks

      protected Map<String,File> uploadedTracks
  • Constructor Details

    • MediaTracksHandler

      public MediaTracksHandler()
  • Method Details

    • processAction

      public boolean processAction() throws IOException
      Description copied from class: JcmsFormHandler
      Method to be implemented to check/validate action to be performed and process them.

      Default implementation is to return false. No need to call super method.

      This method may NOT be invoked at all if security validation are not met.

      You must ensure your handler and JSP can work properly without any code invoked in this method.

      Overrides:
      processAction in class JcmsFormHandler
      Returns:
      false if no redirection is needed, true otherwise
      Throws:
      IOException - IO Exception
    • validateUpdate

      public boolean validateUpdate() throws IOException
      Throws:
      IOException
    • performUpdate

      public boolean performUpdate() throws IOException
      Throws:
      IOException
    • setOpUpdate

      public void setOpUpdate(String update)
    • setId

      public void setId(String id)
    • getId

      public String getId()
    • getMedia

      public FileDocument getMedia()
      Retrieve the FileDocument for which upload is being requested
      Returns:
      a FileDocument instance. never return null if validate returned false.
    • isMediaTrackAuthorized

      public static boolean isMediaTrackAuthorized(FileDocument doc)
      Check if the Media track update can be proposed for the specified document.

      This method does not check member authorization.

      Parameters:
      doc - the FileDocument to check
      Returns:
      true if tracks upload can be proposed, false otherwise