Class CMSProperty

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

@Entity public class CMSProperty extends Object implements Serializable
Represents a generic key-value property that can be attached to CMS pages for custom metadata.
Author:
Florian Alpers
See Also:
  • Field Details

  • Constructor Details

    • CMSProperty

      public CMSProperty()
      Creates a new CMSProperty instance.
    • CMSProperty

      public CMSProperty(String key)
      Creates a new CMSProperty instance.
      Parameters:
      key - property key name
    • CMSProperty

      public CMSProperty(String key, String value)
      Key+value constructor.
      Parameters:
      key - property key name
      value - property value
    • CMSProperty

      public CMSProperty(CMSProperty original)
      Creates a clone of the given property.
      Parameters:
      original - property to copy key and value from
  • Method Details

    • getId

      public Long getId()
      Getter for the field id.
      Returns:
      the database primary key of this property
    • setId

      public void setId(Long id)
      Setter for the field id.
      Parameters:
      id - the database ID to set
    • getKey

      public String getKey()
      Getter for the field key.
      Returns:
      the property key used to look up this CMS property
    • setKey

      public void setKey(String key)
      Setter for the field key.
      Parameters:
      key - the property key used to look up this CMS property
    • getValue

      public String getValue()
      Getter for the field value.
      Returns:
      the string value stored for this CMS property
    • setValue

      public void setValue(String value)
      Setter for the field value.
      Parameters:
      value - the string value stored for this CMS property
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getBooleanValue

      public boolean getBooleanValue()
      getBooleanValue.
      Returns:
      true if the string value of this property parses to true, false otherwise
    • getLongValue

      public Long getLongValue()
      getLongValue.
      Returns:
      the value of this property parsed as a Long, or null if the value is blank or not a valid number
    • getDoubleValue

      public Double getDoubleValue()
      getDoubleValue.
      Returns:
      the value of this property parsed as a Double, or null if the value is blank or not a valid number