Class AbstractMediaDataDelegate

    • Constructor Detail

      • AbstractMediaDataDelegate

        public AbstractMediaDataDelegate​(MediaType mediaType,
                                         String language,
                                         String albumId,
                                         List<org.apache.commons.fileupload.FileItem> parameters)
      • AbstractMediaDataDelegate

        public AbstractMediaDataDelegate​(MediaType mediaType,
                                         String language,
                                         String albumId,
                                         List<org.apache.commons.fileupload.FileItem> parameters,
                                         boolean skipEmptyValues)
    • Method Detail

      • getMediaType

        protected MediaType getMediaType()
      • isHeaderData

        public boolean isHeaderData()
        Checks if header data exists
        Returns:
        true if the header data is set. False otherwise.
      • isForm

        public boolean isForm()
        Checks if a form exists
        Returns:
        true if there is both a form set and the corresponding parameters to that form. False otherwise.
      • setForm

        public void setForm​(org.silverpeas.core.contribution.content.form.RecordSet recordSet,
                            org.silverpeas.core.contribution.content.form.Form form)
        Set a form.
        Parameters:
        recordSet - the set of form's records
        form - the form definition.
      • updateHeader

        public void updateHeader​(Media media)
        Perform a header data update
        Parameters:
        media - the media to update with the header data.
      • updateForm

        public void updateForm​(String mediaId,
                               org.silverpeas.core.contribution.content.form.PagesContext pagesContext)
                        throws org.silverpeas.core.contribution.content.form.FormException
        Perform a form update
        Parameters:
        mediaId - the unique identifier of the media for which the form has to be updated
        pagesContext - pages context of an updated form
        Throws:
        org.silverpeas.core.contribution.content.form.FormException
      • getLanguage

        public String getLanguage()
        Returns:
        the language
      • getAlbumId

        public String getAlbumId()
        Returns:
        the albumId
      • getFileItem

        public org.apache.commons.fileupload.FileItem getFileItem()
        Gets the file from parameters
        Returns:
        a FileItem object
      • isSkipEmptyValues

        public boolean isSkipEmptyValues()
        Returns:
        the skipEmptyValues