Package io.goobi.viewer.model.cms
Class CMSCategory
java.lang.Object
io.goobi.viewer.model.cms.CMSCategory
- All Implemented Interfaces:
Serializable,Comparable<CMSCategory>
Represents a category tag that can be assigned to CMS pages and media items for grouping.
- Author:
- Florian Alpers
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new CMSCategory instance.CMSCategory(CMSCategory blueprint, boolean keepId) Creates a new CMSCategory instance.CMSCategory(String name) Creates a new CMSCategory instance. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(CMSCategory other) booleanGetter for the fielddescription.getId()Getter for the fieldid.getName()Getter for the fieldname.inthashCode()booleanisInUse()voidsetDescription(String description) Setter for the fielddescription.voidSetter for the fieldid.voidSetter for the fieldname.toString()
-
Constructor Details
-
CMSCategory
public CMSCategory()Creates a new CMSCategory instance. -
CMSCategory
Creates a new CMSCategory instance.- Parameters:
name- display name for this category
-
CMSCategory
Creates a new CMSCategory instance.- Parameters:
blueprint- category to copy fields fromkeepId- true to retain the original database ID; false to clear it
-
-
Method Details
-
isInUse
- Returns:
- true if there are CMS pages or media using this category; false otherwise
- Throws:
DAOException
-
getId
Getter for the fieldid.- Returns:
- the database primary key of this category
-
setId
Setter for the fieldid.- Parameters:
id- the database ID to set
-
getName
Getter for the fieldname.- Returns:
- the unique name identifier of this CMS category
-
setName
Setter for the fieldname.- Parameters:
name- the unique name identifier of this CMS category
-
getDescription
Getter for the fielddescription.- Returns:
- the optional human-readable description of this CMS category
-
setDescription
Setter for the fielddescription.- Parameters:
description- an optional human-readable description of this CMS category
-
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<CMSCategory>
-