Class CMSContent
java.lang.Object
io.goobi.viewer.model.cms.pages.content.CMSContent
- Direct Known Subclasses:
CMSAdvancedSearchContent,CMSArchiveContent,CMSBrowseContent,CMSCollectionContent,CMSGeomapContent,CMSImageListContent,CMSMediaContent,CMSMediumTextContent,CMSMetadataContent,CMSPageListContent,CMSRecordListContent,CMSRSSContent,CMSSearchContent,CMSSearchFacetsContent,CMSShortTextContent,CMSSliderContent
Interface for all classes containing a specific kind of content for a
CMSPage. Each CMSContent on a CMSPage is wrapped in a
CMSContentItem which itself is contained in a CMSComponent.- Author:
- Florian Alpers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract CMSContentcopy()exportHtmlFragment(String outputFolderPath, String namingScheme) Writes HTML fragment value as file for re-indexing.abstract StringgetData()abstract StringgetId()abstract StringhandlePageLoad(boolean resetResults, CMSComponent component) Method to call when loading a CMSPage including this content item.abstract booleanisEmpty()booleanvoidvoidvoidsetOwningComponent(PersistentCMSComponent owningComponent) voidsetRequired(boolean required)
-
Constructor Details
-
CMSContent
protected CMSContent() -
CMSContent
-
-
Method Details
-
getBackendComponentName
-
getBackendComponentLibrary
-
getItemId
-
setItemId
-
getOwningComponent
-
setOwningComponent
-
getOwningPage
-
copy
-
exportHtmlFragment
public abstract List<File> exportHtmlFragment(String outputFolderPath, String namingScheme) throws IOException, ViewerConfigurationException 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.- Parameters:
outputFolderPath- filesystem path to the export output foldernamingScheme- base filename scheme for exported files- Returns:
- Exported Files
- Throws:
IOException- if any.ViewerConfigurationException
-
handlePageLoad
public abstract String handlePageLoad(boolean resetResults, CMSComponent component) throws PresentationException Method to call when loading a CMSPage including this content item.- Parameters:
resetResults- if true, any cached results should be discarded and reloadedcomponent- the enclosing CMS component triggering the page load- Returns:
- a JSF action response
- Throws:
PresentationException
-
isEmpty
public abstract boolean isEmpty() -
getId
-
setId
- Parameters:
id- the database id to set
-
getData
- Parameters:
width- optional target width in pixelsheight- optional target height in pixels- Returns:
- a string representing this contentItem for use in frontend-components. May be an empty string for content with no clear String representation
-
getData
-
isRequired
public boolean isRequired() -
setRequired
public void setRequired(boolean required) - Parameters:
required- true if this content item must not be empty
-