Class AbstractMediaDataDelegate

java.lang.Object
org.silverpeas.components.gallery.delegate.AbstractMediaDataDelegate
Direct Known Subclasses:
MediaDataCreateDelegate, MediaDataUpdateDelegate

public abstract class AbstractMediaDataDelegate extends Object
Author:
Yohann Chastagnier
  • Constructor Details

    • AbstractMediaDataDelegate

      public AbstractMediaDataDelegate(MediaType mediaType, String language, String albumId, List<org.silverpeas.core.util.file.FileItem> parameters)
    • AbstractMediaDataDelegate

      public AbstractMediaDataDelegate(MediaType mediaType, String language, String albumId, List<org.silverpeas.core.util.file.FileItem> parameters, boolean skipEmptyValues)
  • Method Details

    • getMediaType

      protected MediaType getMediaType()
    • isHeaderData

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

      public AbstractMediaDataDelegate.HeaderData getHeaderData()
      Get the photo header data
      Returns:
      a AbstractMediaDataDelegate.HeaderData instance.
    • 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.silverpeas.core.util.file.FileItem getFileItem()
      Gets the file from parameters
      Returns:
      a FileItem object
    • isSkipEmptyValues

      public boolean isSkipEmptyValues()
      Returns:
      the skipEmptyValues