Package org.ametys.cms.tag
Class TagHelper
java.lang.Object
org.ametys.cms.tag.TagHelper
Helper class which provides useful methods to operate on
Tag
objects.-
Method Summary
Modifier and TypeMethodDescriptiongetAncestorNames
(Tag tag, boolean includeCurrent) Retrieves all name of the ancestors of the current tag.getAncestors
(Tag tag, boolean includeCurrent) Retrieves all ancestors of the current tag.getDescendantNames
(Tag tag, boolean includeCurrent) Retrieves all name of the descendants (direct and non-direct children) of the current tag.getDescendants
(Tag tag, boolean includeCurrent) Retrieves all descendants (direct and non-direct children) of the current tag.
-
Method Details
-
getDescendants
Retrieves all descendants (direct and non-direct children) of the current tag.- Parameters:
tag
- the current tagincludeCurrent
- true to include the current tag itself- Returns:
- the set of descendant tags.
-
getDescendantNames
Retrieves all name of the descendants (direct and non-direct children) of the current tag.- Parameters:
tag
- the current tagincludeCurrent
- true to include the current tag itself- Returns:
- the set of descendant tag names
-
getAncestors
Retrieves all ancestors of the current tag.- Parameters:
tag
- the current tagincludeCurrent
- true to include the current tag itself- Returns:
- the set of ancestor tags.
-
getAncestorNames
Retrieves all name of the ancestors of the current tag.- Parameters:
tag
- the current tagincludeCurrent
- true to include the current tag itself- Returns:
- the set of ancestor tag names
-