Package io.goobi.viewer.model.cms.media
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 Summary
Modifier and TypeMethodDescriptionA regular expression determining which filenames are shown in the media list and may be uploaded.getMediaItem.getMediaItemWrapper.A string representing the allowed media formates for a user.booleanhasMediaItem.voidsetMediaItem(CMSMediaItem item) setMediaItem.
-
Method Details
-
setMediaItem
setMediaItem.- Parameters:
item- aCMSMediaItemobject.
-
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
CategorizableTranslatedSelectable<CMSMediaItem> getMediaItemWrapper()getMediaItemWrapper.- Returns:
- the CMS media item wrapped with category and selection state information
-