lumis.service.categorization
Class CategorizationUtil

Package class diagram package CategorizationUtil
java.lang.Object
  extended by lumis.service.categorization.CategorizationUtil

public class CategorizationUtil
extends Object

Contains utility methods related to content categorization features.

Since:
6.2.0

Nested Class Summary
static class CategorizationUtil.CyclicTermsException
          Exception thrown when the path of a term cannot be determined because its ancestral are in a cyclic graph.
 
Constructor Summary
CategorizationUtil()
           
 
Method Summary
static String getBestTermName(String termContentId)
          Returns the best name of the specified term to be shown to current user.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CategorizationUtil

public CategorizationUtil()
Method Detail

getTermPathContentIds

public static List<String> getTermPathContentIds(String termContentId)
                                          throws PortalException,
                                                 CategorizationUtil.CyclicTermsException
Returns the content identifiers that make up the path to the specified term.

Parameters:
termContentId - the term's content identifier.
Returns:
a list of content identifiers, from farthest ancestral to the specified term inclusive.
Throws:
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
Since:
6.2.0

getTermPathNames

public static List<String> getTermPathNames(String termContentId)
                                     throws PortalException,
                                            CategorizationUtil.CyclicTermsException
Returns the names of terms make up the path to the specified term.

Parameters:
termContentId - the term's content identifier.
Returns:
a list of term names, from farthest ancestral to the specified term inclusive. If a term has multiple name, the best name appropriate to current user session locale is used.
Throws:
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
Since:
6.2.0

getBestTermName

public static String getBestTermName(String termContentId)
                              throws PortalException
Returns the best name of the specified term to be shown to current user.

Parameters:
termContentId - the term's content identifier.
Returns:
the name.
Throws:
PortalObjectNotFoundException - if the specified content could not be found.
PortalException
Since:
6.2.0


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.