Package io.goobi.viewer.model.cms
Class CMSStaticPage
java.lang.Object
io.goobi.viewer.model.cms.CMSStaticPage
- All Implemented Interfaces:
Serializable
Maps a CMS page to a static viewer page URL, allowing CMS content to replace built-in viewer pages.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new CMSStaticPage instance.CMSStaticPage(String name) Creates a new CMSStaticPage instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGetter for the fieldcmsPage.Getter for the fieldcmsPageId.getCmsPageOptional.getId()Getter for the fieldid.Getter for the fieldpageName.inthashCode()booleanisHasCmsPage.booleanisLanguageComplete(Locale locale) isLanguageComplete.voidsetCmsPage(CMSPage cmsPage) Setter for the fieldcmsPage.voidsetCmsPageId(Long cmsPageId) Setter for the fieldcmsPageId.
-
Constructor Details
-
CMSStaticPage
public CMSStaticPage()Creates a new CMSStaticPage instance. -
CMSStaticPage
Creates a new CMSStaticPage instance.- Parameters:
name- internal page name identifying this static page- Throws:
NullPointerException- if the given name is null
-
-
Method Details
-
getCmsPageOptional
getCmsPageOptional.- Returns:
- the associated CMS page wrapped in an Optional, or an empty Optional if no page is assigned
-
getCmsPage
Getter for the fieldcmsPage.- Returns:
- the associated CMS page, or null if none is set
-
setCmsPage
Setter for the fieldcmsPage.- Parameters:
cmsPage- the CMS page to associate with this static page; also updates the stored page ID
-
getId
Getter for the fieldid.- Returns:
- the database primary key of this static page mapping
-
getPageName
Getter for the fieldpageName.- Returns:
- the internal page name identifying this static page
-
isLanguageComplete
isLanguageComplete.- Parameters:
locale- locale to check for completeness- Returns:
- true if the associated CMS page is complete for the given locale, false otherwise
-
isHasCmsPage
public boolean isHasCmsPage()isHasCmsPage.- Returns:
- true only if isUseCmsPage == true and cmsPage != null
-
getCmsPageId
Getter for the fieldcmsPageId.- Returns:
- the database ID of the associated CMS page wrapped in an Optional, or an empty Optional if no page is assigned
-
setCmsPageId
Setter for the fieldcmsPageId.- Parameters:
cmsPageId- the database ID of the associated CMS page; triggers a page lookup if changed
-
hashCode
public int hashCode() -
equals
-
getPageType
-