Package org.ametys.cms.tag
Class DefaultTag
java.lang.Object
org.ametys.cms.tag.DefaultTag
- All Implemented Interfaces:
Tag
This class represent a Tag
-
Field Summary
Fields inherited from interface org.ametys.cms.tag.Tag
NAME_PATTERN
-
Constructor Summary
ConstructorDescriptionDefaultTag
(String id) ConstructorDefaultTag
(String id, String name, DefaultTag parent, I18nizableText title, I18nizableText description) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new child tag.Retrieves the description.getId()
Get the tag unique id.getName()
Get the tag name.Get the parent tagGet the parent name.Try to get a child tag by its idgetTags()
Retrieves the Set of child tagsgetTitle()
Retrieves the title.boolean
Determines if a tag existsvoid
Set the child tags
-
Constructor Details
-
DefaultTag
Constructor- Parameters:
id
- The id of the tag. The id must be unique.
-
DefaultTag
public DefaultTag(String id, String name, DefaultTag parent, I18nizableText title, I18nizableText description) Constructor- Parameters:
id
- The id of the tag. The id must be unique.name
- The name of the tag. The name must be unique. The name is the same as the id except for JCR tag.parent
- The parent tag (can be null if the tag has no parent)title
- the tag titledescription
- the tag description
-
-
Method Details
-
getId
Description copied from interface:Tag
Get the tag unique id. -
getName
Description copied from interface:Tag
Get the tag name. -
getTitle
Description copied from interface:Tag
Retrieves the title. -
getDescription
Description copied from interface:Tag
Retrieves the description.- Specified by:
getDescription
in interfaceTag
- Returns:
- the description.
-
getParentName
Description copied from interface:Tag
Get the parent name.- Specified by:
getParentName
in interfaceTag
- Returns:
- The parent name.
-
getParent
Description copied from interface:Tag
Get the parent tag -
addTag
Description copied from interface:Tag
Add a new child tag. -
getTags
Description copied from interface:Tag
Retrieves the Set of child tags -
getTag
Description copied from interface:Tag
Try to get a child tag by its id -
hasTag
Description copied from interface:Tag
Determines if a tag exists -
setTags
Description copied from interface:Tag
Set the child tags
-