Class CMSPageTemplate
- All Implemented Interfaces:
IPolyglott
,Serializable
,Comparable<CMSPageTemplate>
Template to create a CMSPage
. Contains some general information about the template as well as a list of components
and
sidebar widgets
to be included in the page
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructor for CMSPage.CMSPageTemplate
(CMSPage original) CMSPageTemplate
(CMSPageTemplate original) creates a deep copy of the original CMSPage. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCategory
(CMSCategory category) addCategory.addComponent
(CMSComponent template) addComponent
(String filename, CMSTemplateManager templateManager) void
addSidebarElement
(CMSSidebarElement element) addSidebarElement.void
addToSidebar
(List<WidgetDisplayElement> widgets) int
boolean
void
decrementOrder
(CMSComponent component) boolean
Getter for the fieldcategories
.Getter for the fielddateCreated
.getId()
Getter for the fieldid
.getName()
Getter for the fieldselectableCategories
.Getter for the fieldsidebarElements
.Getter for the fieldsidebarElementString
.Getter for the fieldsubThemeDiscriminatorValue
.getTitle()
getTitle.getTitle.de.intranda.metadata.multilanguage.IMetadataValue
Getter for the fieldwrapperElementClass
.int
hashCode()
boolean
void
incrementOrder
(CMSComponent component) void
initialiseCMSComponents
(CMSTemplateManager templateManager) boolean
isComplete
(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 trueboolean
boolean
If this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' classboolean
isFirstComponent
(CMSComponent component) boolean
isHasSidebarElements.boolean
isLanguageComplete
(Locale locale) isLanguageComplete.boolean
isLastComponent
(CMSComponent component) boolean
boolean
boolean
isPublished.boolean
isUseDefaultSidebar.boolean
Only meaningfull for the default language for which all required fields must be filledvoid
moveDownSidebarElement
(CMSSidebarElement element) void
moveUpSidebarElement
(CMSSidebarElement element) void
removeCategory
(CMSCategory category) removeCategory.boolean
removeComponent
(CMSComponent component) boolean
removeComponent
(PersistentCMSComponent component) void
removeSidebarElement
(CMSSidebarElement element) void
void
setCategories
(List<CMSCategory> categories) Setter for the fieldcategories
.void
setComponentOrder
(CMSComponent component, int order) Set the order attribute of thePersistentCMSComponent
belonging to the givenCMSComponent
to the given order value.void
setDateCreated
(LocalDateTime dateCreated) Setter for the fielddateCreated
.void
setDateUpdated
(LocalDateTime dateUpdated) Setter for the fielddateUpdated
.void
setDescription
(TranslatedText description) void
Setter for the fieldid
.void
setLegacyTemplate
(boolean legacyTemplate) void
setLockComponents
(boolean lockComponents) void
setPublished
(boolean published) Setter for the fieldpublished
.void
setSelectedLocale
(Locale locale) Set the locale to use for display and editingvoid
setSidebarElements
(List<CMSSidebarElement> sidebarElements) Setter for the fieldsidebarElements
.void
setSidebarElementString
(String sidebarElementString) Setter for the fieldsidebarElementString
.void
setSubThemeDiscriminatorValue
(String subThemeDiscriminatorValue) Setter for the fieldsubThemeDiscriminatorValue
.void
void
setUseDefaultSidebar
(boolean useDefaultSidebar) Setter for the fielduseDefaultSidebar
.void
setWrapperElementClass
(String wrapperElementClass) Setter for the fieldwrapperElementClass
.toString()
void
Retrieve 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, wait
Methods inherited from interface io.goobi.viewer.model.translations.IPolyglott
getLocales, isDefaultLocaleSelected, isSelected, setSelectedLocale
-
Constructor Details
-
CMSPageTemplate
public CMSPageTemplate()Constructor for CMSPage.
-
CMSPageTemplate
creates a deep copy of the original CMSPage. Only copies persisted properties and performs initialization for them- Parameters:
original
- aCMSPageTemplate
object.
-
CMSPageTemplate
-
-
Method Details
-
initialiseCMSComponents
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CMSPageTemplate>
-
addSidebarElement
addSidebarElement.
- Parameters:
element
- aCMSSidebarElement
object.
-
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
-
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
- aList
object.
-
addCategory
addCategory.
- Parameters:
category
- aCMSCategory
object.
-
removeCategory
removeCategory.
- Parameters:
category
- aCMSCategory
object.
-
getSidebarElementString
Getter for the field
sidebarElementString
.- Returns:
- the sidebarElementString
-
setSidebarElementString
Setter for the field
sidebarElementString
.- Parameters:
sidebarElementString
- the sidebarElementString to set
-
isLanguageComplete
isLanguageComplete.
- Parameters:
locale
- aLocale
object.- Returns:
- a boolean.
-
getTitle
getTitle.
- Returns:
- a
String
object.
-
getTitle
getTitle.
-
getTitleTranslations
public de.intranda.metadata.multilanguage.IMetadataValue getTitleTranslations() -
getDescription
-
setDescription
-
getSubThemeDiscriminatorValue
Getter for the field
subThemeDiscriminatorValue
.- Returns:
- the subThemeDiscriminatorValue
-
setSubThemeDiscriminatorValue
Setter for the field
subThemeDiscriminatorValue
.- Parameters:
subThemeDiscriminatorValue
- the subThemeDiscriminatorValue to set
-
isHasSidebarElements
public boolean isHasSidebarElements()isHasSidebarElements.
- Returns:
- a boolean.
-
toString
-
getWrapperElementClass
Getter for the field
wrapperElementClass
.- Returns:
- the
wrapperElementClass
-
setWrapperElementClass
Setter for the field
wrapperElementClass
.- Parameters:
wrapperElementClass
- thewrapperElementClass
to set
-
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() -
getAdminBackendUrl
-
getPersistentComponents
-
getComponents
-
getAsCMSComponent
-
removeComponent
-
removeComponent
-
addComponent
-
isComplete
Description copied from interface:IPolyglott
If 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:
isComplete
in interfaceIPolyglott
- 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:IPolyglott
Only meaningfull for the default language for which all required fields must be filled- Specified by:
isValid
in interfaceIPolyglott
- Returns:
- true if all required fields contain a value in the given locale
-
hasSearchFunctionality
public boolean hasSearchFunctionality() -
getSearch
-
setComponentOrder
Set the order attribute of thePersistentCMSComponent
belonging to the givenCMSComponent
to 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
-
isEmpty
Description copied from interface:IPolyglott
If this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' class- Specified by:
isEmpty
in interfaceIPolyglott
- Returns:
- true if no fields are filled for the given locale
-
getSelectedLocale
- Specified by:
getSelectedLocale
in interfaceIPolyglott
- Returns:
- the locale currently set by
IPolyglott.setSelectedLocale(Locale)
-
setSelectedLocale
Description copied from interface:IPolyglott
Set the locale to use for display and editing- Specified by:
setSelectedLocale
in interfaceIPolyglott
-
isLockComponents
public boolean isLockComponents() -
setLockComponents
public void setLockComponents(boolean lockComponents) -
isLegacyTemplate
public boolean isLegacyTemplate() -
setLegacyTemplate
public void setLegacyTemplate(boolean legacyTemplate) -
addComponent
public PersistentCMSComponent addComponent(String filename, CMSTemplateManager templateManager) throws IllegalArgumentException, IllegalStateException -
isContainsPagedComponents
public boolean isContainsPagedComponents() -
getName
-
setTitleTranslations
-