Class MediaTracksHandler

    • Field Detail

      • supportedTrackExtensions

        protected final java.util.Set<java.lang.String> supportedTrackExtensions
      • supportedTrackMimeTypes

        protected final java.util.Set<java.lang.String> supportedTrackMimeTypes
      • opUpdate

        protected boolean opUpdate
      • deletedTracks

        protected java.util.Set<java.io.File> deletedTracks
      • uploadedTracks

        protected java.util.Map<java.lang.String,​java.io.File> uploadedTracks
    • Constructor Detail

      • MediaTracksHandler

        public MediaTracksHandler()
    • Method Detail

      • processAction

        public boolean processAction()
                              throws java.io.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:
        java.io.IOException - IO Exception
      • validateUpdate

        public boolean validateUpdate()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • performUpdate

        public boolean performUpdate()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • setOpUpdate

        public void setOpUpdate​(java.lang.String update)
      • setId

        public void setId​(java.lang.String id)
      • getId

        public java.lang.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