Interface CMSMediaHolder

All Known Subinterfaces:
CMSMediaMultiHolder
All Known Implementing Classes:
Campaign, CMSArchiveConfig, CMSCollection, CMSDocumentContent, CMSMediaContent, Highlight, LicenseTypePlaceholderInfo, SimpleMediaHolder

public interface CMSMediaHolder
Any object which may directly contain a CMSMediaItem. Only classes implementing this interface may be given a mediaItem in the selectMedia dialog, since the dialog uses CmsBean.fillSelectedMediaHolder(CategorizableTranslatedSelectable) to apply the selected MediaItem
Author:
Florian Alpers
  • Method Details

    • setMediaItem

      void setMediaItem(CMSMediaItem item)
      setMediaItem.
      Parameters:
      item - a CMSMediaItem object.
    • getMediaItem

      CMSMediaItem getMediaItem()
      getMediaItem.
      Returns:
      the associated CMS media item, or null if none is set
    • getMediaFilter

      String getMediaFilter()
      A regular expression determining which filenames are shown in the media list and may be uploaded.
      Returns:
      the regex pattern used to filter acceptable media filenames for this holder
    • getMediaTypes

      String getMediaTypes()
      A string representing the allowed media formates for a user. Should be a comma separated list of format names or filename suffixes
      Returns:
      String
    • hasMediaItem

      boolean hasMediaItem()
      hasMediaItem.
      Returns:
      true if this holder has an associated CMS media item, false otherwise
    • getMediaItemWrapper

      getMediaItemWrapper.
      Returns:
      the CMS media item wrapped with category and selection state information