Class CMSPage
- All Implemented Interfaces:
Harvestable,IPolyglott,Serializable,Comparable<CMSPage>
CMSPage class.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCMSPage()Constructor for CMSPage.creates a deep copy of the original CMSPage.CMSPage(CMSPageTemplate original) creates a CMSPage from aCMSPageTemplate. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCategory(CMSCategory category) addCategory.addComponent(String filename, CMSTemplateManager templateManager) voidaddPersistentComponent(PersistentCMSComponent persistentComponent) voidaddSidebarElement(CMSSidebarElement element) addSidebarElement.voidaddToSidebar(List<WidgetDisplayElement> widgets) intbooleanvoiddecrementOrder(CMSComponent component) intDeletes exported HTML/TEXT fragments from a related record's data folder.booleanorg.jdom2.DocumentExports relevant page contents as JDOM2 document for indexingexportTexts(String outputFolderPath, String namingScheme) Exports text/html fragments from this page's content items for indexing.Getter for the fieldcategories.Getter for the fielddateCreated.getDateUpdated.getId()Getter for the fieldid.intGets the pagination number for this page's main list if it contains onegetMenuTitle.getMenuTitle(Locale locale) getMenuTitle.getMenuTitleOrTitle.getMenuTitleOrTitle(Locale locale) getMenuTitleOrTitle.Getter for the fieldpageSorting.getPageSortingOrElse(long defaultOrder) getPageUrl.Getter for the fieldparentPageId.Getter for the fieldpersistentUrl.getPi()getPi.getPreviewItem(String itemId) getPreviewItems(String itemId) getProperty(String key) Returns the property with the given key or else creates a new one with that key and returns itGetter for the fieldrelatedPI.getRelativeUrlPath.getRelativeUrlPath(boolean pretty) getRelativeUrlPath.Getter for the fieldselectableCategories.Getter for the fieldsidebarElements.Getter for the fieldsidebarElementString.Getter for the fieldsubThemeDiscriminatorValue.getTitle()getTitle.getTitle.de.intranda.metadata.multilanguage.IMetadataValuegetUrl()Like getPageUrl() but does not require CmsBean (which is unavailable in different threads).Getter for the fieldwrapperElementClass.inthashCode()booleanbooleanvoidincrementOrder(CMSComponent component) voidinitialiseCMSComponents(CMSTemplateManager templateManager) booleanisComplete(Locale locale) If this returns true, an associated language tab should have the 'already-translated' class, otherwise the '-partly-translated' class unlessIPolyglott.isEmpty(Locale)also returns truebooleanbooleanbooleanIf this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' classbooleanisFirstComponent(CMSComponent component) booleanisHasSidebarElements.booleanisLastComponent(CMSComponent component) booleanbooleanbooleanisMayContainUrlParameters.booleanisPublished.booleanbooleanbooleanisUseDefaultSidebar.booleanOnly meaningful for the default language for which all required fields must be filledvoidmoveDownSidebarElement(CMSSidebarElement element) voidmoveUpSidebarElement(CMSSidebarElement element) voidremoveCategory(CMSCategory category) removeCategory.booleanremoveComponent(CMSComponent component) voidremoveSidebarElement(CMSSidebarElement element) voidvoidsetAccessCondition(String accessCondition) voidsetCategories(List<CMSCategory> categories) Setter for the fieldcategories.voidsetComponentOrder(CMSComponent component, int order) Set the order attribute of thePersistentCMSComponentbelonging to the givenCMSComponentto the given order value.voidsetDateCreated(LocalDateTime dateCreated) Setter for the fielddateCreated.voidsetDateUpdated(LocalDateTime dateUpdated) Setter for the fielddateUpdated.voidSetter for the fieldid.voidsetListPage(int listPage) Sets the pagination number for this page's main list if it contains onevoidsetMenuTitle(TranslatedText menuTitle) voidsetPageSorting(Long pageSorting) Setter for the fieldpageSorting.voidsetParentPageId(String parentPageId) Setter for the fieldparentPageId.voidsetPersistentUrl(String persistentUrl) Setter for the fieldpersistentUrl.voidsetPublished(boolean published) Setter for the fieldpublished.voidsetRelatedPI(String relatedPI) Setter for the fieldrelatedPI.voidsetSearchable(boolean searchable) voidsetSelectedLocale(Locale locale) Set the locale to use for display and editingvoidsetSidebarElements(List<CMSSidebarElement> sidebarElements) Setter for the fieldsidebarElements.voidsetSidebarElementString(String sidebarElementString) Setter for the fieldsidebarElementString.voidsetSubThemeDiscriminatorValue(String subThemeDiscriminatorValue) Setter for the fieldsubThemeDiscriminatorValue.voidsetTemplateId(Long templateId) voidsetTitle(TranslatedText title) voidsetUseAsDefaultRecordView(boolean useAsDefaultRecordView) voidsetUseDefaultSidebar(boolean useDefaultSidebar) Setter for the fielduseDefaultSidebar.voidsetWrapperElementClass(String wrapperElementClass) Setter for the fieldwrapperElementClass.toString()voidRetrieve all categories fresh from the DAO and write them to this depending on the state of the selectableCategories list.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.goobi.viewer.model.translations.IPolyglott
getLocales, isDefaultLocaleSelected, isSelected, setSelectedLocale
-
Field Details
-
GLOBAL_LANGUAGE
ConstantGLOBAL_LANGUAGE="global"- See Also:
-
CLASSIFICATION_OVERVIEWPAGE
ConstantCLASSIFICATION_OVERVIEWPAGE="overviewpage"- See Also:
-
TOPBAR_SLIDER_ID
- See Also:
-
-
Constructor Details
-
CMSPage
public CMSPage()Constructor for CMSPage.
-
CMSPage
creates a deep copy of the original CMSPage. Only copies persisted properties and performs initialization for them- Parameters:
original- aCMSPageobject.
-
CMSPage
creates a CMSPage from aCMSPageTemplate. Only copies persisted properties and performs initialization for them- Parameters:
original- aCMSPageTemplateobject.
-
-
Method Details
-
initialiseCMSComponents
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<CMSPage>
-
addSidebarElement
addSidebarElement.
- Parameters:
element- aCMSSidebarElementobject.
-
getId
Getter for the field
id.- Returns:
- the id
-
setId
Setter for the field
id.- Parameters:
id- the id to set
-
getDateCreated
Getter for the field
dateCreated.- Returns:
- the dateCreated
-
setDateCreated
Setter for the field
dateCreated.- Parameters:
dateCreated- the dateCreated to set
-
getDateUpdated
getDateUpdated.
- Specified by:
getDateUpdatedin interfaceHarvestable- Returns:
- a
LocalDateTimeobject.
-
setDateUpdated
Setter for the field
dateUpdated.- Parameters:
dateUpdated- the dateUpdated to set
-
isPublished
public boolean isPublished()isPublished.
- Returns:
- the published
-
setPublished
public void setPublished(boolean published) Setter for the field
published.- Parameters:
published- the published to set
-
isUseDefaultSidebar
public boolean isUseDefaultSidebar()isUseDefaultSidebar.
- Returns:
- the useDefaultSidebar
-
setUseDefaultSidebar
public void setUseDefaultSidebar(boolean useDefaultSidebar) Setter for the field
useDefaultSidebar.- Parameters:
useDefaultSidebar- the useDefaultSidebar to set
-
getSidebarElements
Getter for the field
sidebarElements.- Returns:
- the sidebarElements
-
setSidebarElements
Setter for the field
sidebarElements.- Parameters:
sidebarElements- the sidebarElements to set
-
addToSidebar
-
moveUpSidebarElement
-
moveDownSidebarElement
-
removeSidebarElement
-
containsSidebarElement
-
getCategories
Getter for the field
categories.- Returns:
- the classifications
-
setCategories
Setter for the field
categories.- Parameters:
categories- aListobject.
-
addCategory
addCategory.
- Parameters:
category- aCMSCategoryobject.
-
removeCategory
removeCategory.
- Parameters:
category- aCMSCategoryobject.
-
getSidebarElementString
Getter for the field
sidebarElementString.- Returns:
- the sidebarElementString
-
setSidebarElementString
Setter for the field
sidebarElementString.- Parameters:
sidebarElementString- the sidebarElementString to set
-
getTitle
getTitle.
- Returns:
- a
Stringobject.
-
getTitle
getTitle.
-
getTitleTranslations
public de.intranda.metadata.multilanguage.IMetadataValue getTitleTranslations() -
getMenuTitle
getMenuTitle.
- Returns:
- a
Stringobject.
-
getMenuTitle
getMenuTitle.
-
getMenuTitleOrTitle
getMenuTitleOrTitle.
- Returns:
- a
Stringobject.
-
getMenuTitleOrTitle
getMenuTitleOrTitle.
-
getMenuTitleTranslations
-
getPageSorting
Getter for the field
pageSorting.- Returns:
- a
Longobject.
-
getPageSortingOrElse
-
setPageSorting
Setter for the field
pageSorting.- Parameters:
pageSorting- aLongobject.
-
getSubThemeDiscriminatorValue
Getter for the field
subThemeDiscriminatorValue.- Returns:
- the subThemeDiscriminatorValue
-
setSubThemeDiscriminatorValue
Setter for the field
subThemeDiscriminatorValue.- Parameters:
subThemeDiscriminatorValue- the subThemeDiscriminatorValue to set
-
getPageUrl
getPageUrl.
- Returns:
- the pretty url to this page (using alternative url if set)
-
getUrl
Like getPageUrl() but does not require CmsBean (which is unavailable in different threads).- Returns:
- URL to this page
-
getListPage
public int getListPage()Gets the pagination number for this page's main list if it contains one- Returns:
- a int.
-
setListPage
public void setListPage(int listPage) Sets the pagination number for this page's main list if it contains one- Parameters:
listPage- a int.
-
getPersistentUrl
Getter for the field
persistentUrl.- Returns:
- the persistentUrl
-
setPersistentUrl
Setter for the field
persistentUrl.- Parameters:
persistentUrl- the persistentUrl to set
-
getRelativeUrlPath
getRelativeUrlPath.
- Returns:
- a
Stringobject.
-
getRelativeUrlPath
getRelativeUrlPath.
- Parameters:
pretty- a boolean.- Returns:
- a
Stringobject.
-
isHasSidebarElements
public boolean isHasSidebarElements()isHasSidebarElements.
- Returns:
- a boolean.
-
setParentPageId
Setter for the field
parentPageId.- Parameters:
parentPageId- the parentPageId to set
-
getParentPageId
Getter for the field
parentPageId.- Returns:
- the parentPageId
-
isMayContainUrlParameters
public boolean isMayContainUrlParameters()isMayContainUrlParameters.
- Returns:
- the mayContainUrlParameters
-
isContainsPagedComponents
public boolean isContainsPagedComponents() -
getRelatedPI
Getter for the field
relatedPI.- Returns:
- the relatedPI
-
setRelatedPI
Setter for the field
relatedPI.- Parameters:
relatedPI- the relatedPI to set
-
isUseAsDefaultRecordView
public boolean isUseAsDefaultRecordView()- Returns:
- the useAsDefaultRecordView
-
setUseAsDefaultRecordView
public void setUseAsDefaultRecordView(boolean useAsDefaultRecordView) - Parameters:
useAsDefaultRecordView- the useAsDefaultRecordView to set
-
getProperty
Returns the property with the given key or else creates a new one with that key and returns it- Parameters:
key- aStringobject.- Returns:
- the property with the given key or else creates a new one with that key and returns it
- Throws:
ClassCastException- if the returned property has the wrong generic type.
-
toString
-
getWrapperElementClass
Getter for the field
wrapperElementClass.- Returns:
- the
wrapperElementClass
-
setWrapperElementClass
Setter for the field
wrapperElementClass.- Parameters:
wrapperElementClass- thewrapperElementClassto set
-
isSearchable
public boolean isSearchable()- Returns:
- the searchable
-
setSearchable
public void setSearchable(boolean searchable) - Parameters:
searchable- the searchable to set
-
getAccessCondition
- Returns:
- the accessCondition
-
setAccessCondition
- Parameters:
accessCondition- the accessCondition to set
-
deleteExportedTextFiles
Deletes exported HTML/TEXT fragments from a related record's data folder. Should be called when deleting this CMS page.- Returns:
- Number of deleted files
- Throws:
ViewerConfigurationException- if any.
-
exportTexts
Exports text/html fragments from this page's content items for indexing.- Parameters:
outputFolderPath- aStringobject.namingScheme- aStringobject.- Returns:
- a
Listobject. - Throws:
IOException- if any.
-
exportAsXml
public org.jdom2.Document exportAsXml()Exports relevant page contents as JDOM2 document for indexing- Returns:
Document
-
writeSelectableCategories
public void writeSelectableCategories()Retrieve all categories fresh from the DAO and write them to this depending on the state of the selectableCategories list. Saving the categories from selectableCategories directly leads to ConcurrentModificationexception when persisting page -
getSelectableCategories
Getter for the field
selectableCategories.- Returns:
- the selectableCategories
- Throws:
DAOException- if any.
-
resetSelectableCategories
public void resetSelectableCategories() -
getPi
getPi.
- Specified by:
getPiin interfaceHarvestable- Returns:
- a
Stringobject.
-
hasTopbarComponents
public boolean hasTopbarComponents() -
getTopbarComponents
-
getAdminBackendUrl
-
getPersistentComponents
-
isComponentsLoaded
public boolean isComponentsLoaded() -
getComponents
-
getAsCMSComponent
-
removeComponent
-
addComponent
public PersistentCMSComponent addComponent(String filename, CMSTemplateManager templateManager) throws IllegalArgumentException, IllegalStateException -
isComplete
Description copied from interface:IPolyglottIf this returns true, an associated language tab should have the 'already-translated' class, otherwise the '-partly-translated' class unlessIPolyglott.isEmpty(Locale)also returns true- Specified by:
isCompletein interfaceIPolyglott- Parameters:
locale-- Returns:
- true if
IPolyglott.isValid(Locale)returns true for the given locale and all fields contain a value which have a value in the default locale. For the default locale,IPolyglott.isComplete(Locale)andIPolyglott.isValid(Locale)are identical. For implementations with only one field, both methods are also always identical
-
isValid
Description copied from interface:IPolyglottOnly meaningful for the default language for which all required fields must be filled- Specified by:
isValidin interfaceIPolyglott- Parameters:
locale-- Returns:
- true if all required fields contain a value in the given locale
-
isEmpty
Description copied from interface:IPolyglottIf this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' class- Specified by:
isEmptyin interfaceIPolyglott- Parameters:
locale-- Returns:
- true if no fields are filled for the given locale
-
getSelectedLocale
- Specified by:
getSelectedLocalein interfaceIPolyglott- Returns:
- the locale currently set by
IPolyglott.setSelectedLocale(Locale)
-
setSelectedLocale
Description copied from interface:IPolyglottSet the locale to use for display and editing- Specified by:
setSelectedLocalein interfaceIPolyglott- Parameters:
locale-
-
hasSearchFunctionality
public boolean hasSearchFunctionality() -
getSearch
-
getTemplate
-
setComponentOrder
Set the order attribute of thePersistentCMSComponentbelonging to the givenCMSComponentto the given order value. Also, sets the order value of all Components which previously had the given order to the order value of the given component- Parameters:
component-order-
-
incrementOrder
-
decrementOrder
-
isFirstComponent
-
isLastComponent
-
setTitle
-
setMenuTitle
-
addPersistentComponent
-
getPreviewItems
-
getPreviewItems
-
getPreviewItem
-
getPreviewComponents
-
getGroupedPageViewComponents
-
getPageViewComponents
-
isLockComponents
public boolean isLockComponents() -
isLegacyPage
public boolean isLegacyPage() -
getTemplateId
-
setTemplateId
-