Package org.ametys.cms.tag
Interface Tag
- All Known Implementing Classes:
Category
,CategoryCMSTag
,CMSTag
,DefaultTag
,KeywordCMSTag
public interface Tag
This class represent a Tag
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new child tag.Retrieves the description.getId()
Get the tag unique id.getName()
Get the tag name.<T extends Tag>
TGet the parent tagGet the parent name.<T extends Tag>
TTry 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
-
Field Details
-
NAME_PATTERN
The pattern a tag name has to respect.
-
-
Method Details
-
getId
Get the tag unique id.- Returns:
- The unique id
-
getName
Get the tag name.- Returns:
- The tag name
-
getParentName
Get the parent name.- Returns:
- The parent name.
-
getParent
Get the parent tag- Type Parameters:
T
- the tag class- Returns:
- The parent tag or null if the tag has no parent.
-
getTitle
Retrieves the title.- Returns:
- the title.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDescription
Retrieves the description.- Returns:
- the description.
-
addTag
Add a new child tag.- Parameters:
tag
- The tag to add
-
setTags
Set the child tags- Parameters:
tags
- The Map of Tag to set
-
getTags
Retrieves the Set of child tags- Returns:
- The child tags in a Map
-
getTag
Try to get a child tag by its id- Type Parameters:
T
- the tag class- Parameters:
tagId
- The id of the child tag- Returns:
- The child tag or null if not existing
-
hasTag
Determines if a tag exists- Parameters:
tagId
- The tag id- Returns:
- true if the tag exists
-