public class CategorizationUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CategorizationUtil.CyclicTermsException
Exception thrown when the path of a term cannot be determined because
its ancestral are in a cyclic graph.
|
Constructor and Description |
---|
CategorizationUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getBestTermName(String termContentId)
Returns the best name of the specified term to be shown to current user.
|
static String |
getBestTermName(String termContentId,
Locale locale)
Returns the best name of the specified term to be shown to current user.
|
static Set<String> |
getDirectTermAssociationsContentIds(CategorizationDataType.Data terms)
Returns a list of all direct term associations related the a collection of
term data tree |
static List<String> |
getTermChildrenByContentId(String contentId,
Locale locale)
Returns a list of all direct children from a given term content identifier.
|
static List<String> |
getTermPathContentIds(String termContentId)
Returns the content identifiers that make up the path to the specified term.
|
static List<String> |
getTermPathNames(String termContentId)
Returns the names of terms make up the path to the specified term.
|
public static List<String> getTermPathContentIds(String termContentId) throws PortalException, CategorizationUtil.CyclicTermsException
termContentId
- the term's content identifier.PortalObjectNotFoundException
- if the specified content could not be found.CategorizationUtil.CyclicTermsException
- if the path cannot be determined because the
term's parent are in a cyclic graph.PortalException
public static List<String> getTermPathNames(String termContentId) throws PortalException, CategorizationUtil.CyclicTermsException
termContentId
- the term's content identifier.PortalObjectNotFoundException
- if the specified content could not be found.CategorizationUtil.CyclicTermsException
- if the path cannot be determined because the
term's parent are in a cyclic graph.PortalException
public static String getBestTermName(String termContentId) throws PortalException
termContentId
- the term's content identifier.PortalObjectNotFoundException
- if the specified content could not be found.PortalException
public static String getBestTermName(String termContentId, Locale locale) throws PortalException
termContentId
- the term's content identifier.PortalObjectNotFoundException
- if the specified content could not be found.PortalException
public static Set<String> getDirectTermAssociationsContentIds(CategorizationDataType.Data terms)
term data tree
terms
- a collection of term data
to extract all terms with direct association.term data tree
.LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.