Class CMSPageTemplate

java.lang.Object
io.goobi.viewer.model.cms.legacy.CMSPageTemplate
All Implemented Interfaces:
Serializable

public class CMSPageTemplate extends Object implements Serializable
Page templates are read from XML configuration files and are not stored in the DB.
See Also:
  • Constructor Details

    • CMSPageTemplate

      public CMSPageTemplate()
  • Method Details

    • loadFromXML

      public static CMSPageTemplate loadFromXML(Path file)
      Loads a page template from the given template file and returns the template object.
      Parameters:
      file - a Path object.
      Returns:
      a io.goobi.viewer.model.cms.CMSPageTemplate object.
      Throws:
      IllegalArgumentException - if file is null
    • validate

      public void validate()

      validate.

    • createCMSComponent

      public CMSComponent createCMSComponent()
    • getId

      public String getId()

      Getter for the field id.

      Returns:
      the id
    • setId

      public void setId(String id)

      Setter for the field id.

      Parameters:
      id - the id to set
    • getName

      public String getName()

      Getter for the field name.

      Returns:
      the name
    • setName

      public void setName(String name)

      Setter for the field name.

      Parameters:
      name - the name to set
    • getVersion

      public String getVersion()

      Getter for the field version.

      Returns:
      the version
    • setVersion

      public void setVersion(String version)

      Setter for the field version.

      Parameters:
      version - the version to set
    • getDescription

      public String getDescription()

      Getter for the field description.

      Returns:
      the description
    • setDescription

      public void setDescription(String description)

      Setter for the field description.

      Parameters:
      description - the description to set
    • getHtmlFileName

      public String getHtmlFileName()

      Getter for the field htmlFileName.

      Returns:
      the htmlFileName
    • setHtmlFileName

      public void setHtmlFileName(String htmlFileName)

      Setter for the field htmlFileName.

      Parameters:
      htmlFileName - the htmlFileName to set
    • getTemplateFileName

      public String getTemplateFileName()

      Getter for the field templateFileName.

      Returns:
      the templateFileName
    • setTemplateFileName

      public void setTemplateFileName(String templateFileName)

      Setter for the field templateFileName.

      Parameters:
      templateFileName - the templateFileName to set
    • getIconFileName

      public String getIconFileName()

      Getter for the field iconFileName.

      Returns:
      the iconFileName
    • setIconFileName

      public void setIconFileName(String iconFileName)

      Setter for the field iconFileName.

      Parameters:
      iconFileName - the iconFileName to set
    • getContentItems

      public List<CMSContentItemTemplate> getContentItems()

      Getter for the field contentItems.

      Returns:
      the contentItems
    • getContentItem

      public CMSContentItemTemplate getContentItem(String itemId)

      getContentItem.

      Parameters:
      itemId - a String object.
      Returns:
      a io.goobi.viewer.model.cms.CMSContentItemTemplate object.
    • setContentItems

      public void setContentItems(List<CMSContentItemTemplate> contentItems)

      Setter for the field contentItems.

      Parameters:
      contentItems - the contentItems to set
    • isDisplaySortingField

      public boolean isDisplaySortingField()

      isDisplaySortingField.

      Returns:
      a boolean.
    • setDisplaySortingField

      public void setDisplaySortingField(boolean displaySortingField)

      Setter for the field displaySortingField.

      Parameters:
      displaySortingField - a boolean.
    • isThemeTemplate

      public boolean isThemeTemplate()

      isThemeTemplate.

      Returns:
      the themeTemplate
    • setThemeTemplate

      public void setThemeTemplate(boolean themeTemplate)

      Setter for the field themeTemplate.

      Parameters:
      themeTemplate - the themeTemplate to set
    • setAppliesToExpandedUrl

      public void setAppliesToExpandedUrl(boolean appliesToExpandedUrl)

      Setter for the field appliesToExpandedUrl.

      Parameters:
      appliesToExpandedUrl - the appliesToExpandedUrl to set
    • isAppliesToExpandedUrl

      public boolean isAppliesToExpandedUrl()

      isAppliesToExpandedUrl.

      Returns:
      the appliesToExpandedUrl
    • setMayHaveTopBarSlider

      public void setMayHaveTopBarSlider(boolean mayHaveTopBarSlider)
      Parameters:
      mayHaveTopBarSlider - the mayHaveTopBarSlider to set
    • isMayHaveTopBarSlider

      public boolean isMayHaveTopBarSlider()
      Returns:
      the mayHaveTopBarSlider
    • parseBoolean

      public static boolean parseBoolean(String text, boolean defaultValue)

      parseBoolean.

      Parameters:
      text - a String object.
      defaultValue - a boolean.
      Returns:
      a boolean.
    • parseBoolean

      public static boolean parseBoolean(String text)

      parseBoolean.

      Parameters:
      text - a String object.
      Returns:
      a boolean.
    • getAttributes

      public Map<String,CMSComponentAttribute> getAttributes()