Package io.goobi.viewer.model.cms
Class CMSProperty
java.lang.Object
io.goobi.viewer.model.cms.CMSProperty
- All Implemented Interfaces:
Serializable
Represents a generic key-value property that can be attached to CMS pages for custom metadata.
- Author:
- Florian Alpers
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new CMSProperty instance.CMSProperty(CMSProperty original) Creates a clone of the given property.CMSProperty(String key) Creates a new CMSProperty instance.CMSProperty(String key, String value) Key+value constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBooleanValue.getDoubleValue.getId()Getter for the fieldid.getKey()Getter for the fieldkey.getLongValue.getValue()Getter for the fieldvalue.voidSetter for the fieldid.voidSetter for the fieldkey.voidSetter for the fieldvalue.toString()
-
Field Details
-
KEY_ACCESS_CONDITION
- See Also:
-
KEY_EMPTY
ConstantKEY_EMPTY="EMPTY".- See Also:
-
-
Constructor Details
-
CMSProperty
public CMSProperty()Creates a new CMSProperty instance. -
CMSProperty
Creates a new CMSProperty instance.- Parameters:
key- property key name
-
CMSProperty
Key+value constructor.- Parameters:
key- property key namevalue- property value
-
CMSProperty
Creates a clone of the given property.- Parameters:
original- property to copy key and value from
-
-
Method Details
-
getId
Getter for the fieldid.- Returns:
- the database primary key of this property
-
setId
Setter for the fieldid.- Parameters:
id- the database ID to set
-
getKey
Getter for the fieldkey.- Returns:
- the property key used to look up this CMS property
-
setKey
Setter for the fieldkey.- Parameters:
key- the property key used to look up this CMS property
-
getValue
Getter for the fieldvalue.- Returns:
- the string value stored for this CMS property
-
setValue
Setter for the fieldvalue.- Parameters:
value- the string value stored for this CMS property
-
toString
-
getBooleanValue
public boolean getBooleanValue()getBooleanValue.- Returns:
- true if the string value of this property parses to
true, false otherwise
-
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
getDoubleValue.- Returns:
- the value of this property parsed as a Double, or null if the value is blank or not a valid number
-