Class CMSMediaContent
java.lang.Object
io.goobi.viewer.model.cms.pages.content.CMSContent
io.goobi.viewer.model.cms.pages.content.types.CMSMediaContent
- All Implemented Interfaces:
CMSMediaHolder
,Comparable<CMSMediaContent>
- Direct Known Subclasses:
CMSDocumentContent
@Entity
public class CMSMediaContent
extends CMSContent
implements CMSMediaHolder, Comparable<CMSMediaContent>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(CMSMediaContent arg0) copy()
boolean
exportHtmlFragment
(String outputFolderPath, String namingScheme) Writes HTML fragment value as file for re-indexing.getMediaDescription.A regular expression determining which filenames are shown in the media list and may be uploadedgetMediaItem.getMediaItemWrapper.getMediaMetadata.getMediaName.A string representing the allowed media formates for a user.getUrl()
handlePageLoad
(boolean resetResults, CMSComponent component) Method to call when loading a CMSPage including this content itemint
hashCode()
boolean
hasMediaItem.boolean
isEmpty()
void
setMediaItem
(CMSMediaItem item) setMediaItem.Methods inherited from class io.goobi.viewer.model.cms.pages.content.CMSContent
getBackendComponentLibrary, getData, getId, getItemId, getOwningComponent, getOwningPage, isRequired, setId, setItemId, setOwningComponent, setRequired
-
Constructor Details
-
CMSMediaContent
public CMSMediaContent() -
CMSMediaContent
-
-
Method Details
-
getBackendComponentName
- Specified by:
getBackendComponentName
in classCMSContent
-
setMediaItem
Description copied from interface:CMSMediaHolder
setMediaItem.
- Specified by:
setMediaItem
in interfaceCMSMediaHolder
- Parameters:
item
- aCMSMediaItem
object.
-
getMediaItem
Description copied from interface:CMSMediaHolder
getMediaItem.
- Specified by:
getMediaItem
in interfaceCMSMediaHolder
- Returns:
- a
CMSMediaItem
object.
-
getMediaFilter
Description copied from interface:CMSMediaHolder
A regular expression determining which filenames are shown in the media list and may be uploaded
- Specified by:
getMediaFilter
in interfaceCMSMediaHolder
- Returns:
- a
String
object.
-
getMediaTypes
Description copied from interface:CMSMediaHolder
A string representing the allowed media formates for a user. Should be a comma separated list of format names or filename suffixes- Specified by:
getMediaTypes
in interfaceCMSMediaHolder
- Returns:
String
-
hasMediaItem
public boolean hasMediaItem()Description copied from interface:CMSMediaHolder
hasMediaItem.
- Specified by:
hasMediaItem
in interfaceCMSMediaHolder
- Returns:
- a boolean.
-
getMediaItemWrapper
Description copied from interface:CMSMediaHolder
getMediaItemWrapper.
- Specified by:
getMediaItemWrapper
in interfaceCMSMediaHolder
- Returns:
- a
CategorizableTranslatedSelectable
object.
-
getUrl
- Throws:
UnsupportedEncodingException
-
getMediaType
-
getUrl
- Throws:
UnsupportedEncodingException
-
copy
- Specified by:
copy
in classCMSContent
-
exportHtmlFragment
public List<File> exportHtmlFragment(String outputFolderPath, String namingScheme) throws IOException, ViewerConfigurationException Description copied from class:CMSContent
Writes HTML fragment value as file for re-indexing. HTML/text fragments are exported directly. Attached media items are exported as long as their content type is one of the supported text document formats.- Specified by:
exportHtmlFragment
in classCMSContent
- Parameters:
outputFolderPath
- aString
object.namingScheme
- aString
object.- Returns:
- Exported Files
- Throws:
IOException
- if any.ViewerConfigurationException
-
handlePageLoad
public String handlePageLoad(boolean resetResults, CMSComponent component) throws PresentationException Description copied from class:CMSContent
Method to call when loading a CMSPage including this content item- Specified by:
handlePageLoad
in classCMSContent
- Returns:
- a JSF action response
- Throws:
PresentationException
-
getMediaName
getMediaName.
- Returns:
- a
String
object.
-
getMediaDescription
getMediaDescription.
- Returns:
- a
String
object.
-
getMediaMetadata
getMediaMetadata.
- Returns:
- The media item metadata object of the current language associated with the contentItem with the given itemId. May return null if no such item exists
-
getData
- Specified by:
getData
in classCMSContent
- Returns:
- a string representing this contentItem for use in frontend-components. May be an empty string for content with no clear String representation
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in classCMSContent
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CMSMediaContent>
-