Package org.ametys.cms.tag
Class TagHelper
- java.lang.Object
-
- org.ametys.cms.tag.TagHelper
-
-
Constructor Summary
Constructors Modifier Constructor Description private
TagHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static Set<Tag>
_getAncestors(Tag tag, boolean includeCurrent, Set<Tag> accumulator)
private static Set<Tag>
_getDescendants(Tag tag, boolean includeCurrent, Set<Tag> accumulator)
static Set<String>
getAncestorNames(Tag tag, boolean includeCurrent)
Retrieves all name of the ancestors of the current tag.static Set<Tag>
getAncestors(Tag tag, boolean includeCurrent)
Retrieves all ancestors of the current tag.static Set<String>
getDescendantNames(Tag tag, boolean includeCurrent)
Retrieves all name of the descendants (direct and non-direct children) of the current tag.static Set<Tag>
getDescendants(Tag tag, boolean includeCurrent)
Retrieves all descendants (direct and non-direct children) of the current tag.
-
-
-
Constructor Detail
-
TagHelper
private TagHelper()
-
-
Method Detail
-
getDescendants
public static Set<Tag> getDescendants(Tag tag, boolean includeCurrent)
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.
-
_getDescendants
private static Set<Tag> _getDescendants(Tag tag, boolean includeCurrent, Set<Tag> accumulator)
-
getDescendantNames
public static Set<String> getDescendantNames(Tag tag, boolean includeCurrent)
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
public static Set<Tag> getAncestors(Tag tag, boolean includeCurrent)
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.
-
_getAncestors
private static Set<Tag> _getAncestors(Tag tag, boolean includeCurrent, Set<Tag> accumulator)
-
getAncestorNames
public static Set<String> getAncestorNames(Tag tag, boolean includeCurrent)
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
-
-