Package org.silverpeas.core.webapi.pdc
Class UserThesaurusHolder
- java.lang.Object
-
- org.silverpeas.core.webapi.pdc.UserThesaurusHolder
-
public class UserThesaurusHolder extends Object
A holder of the thesaurus for a given user. It provides convenient methods to access thesaurus data for a given user.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UserDetail
forUser(UserDetail user)
A convinient method to enhance the readability of the methods.Collection<String>
getSynonymsOf(PdcValueEntity value)
Gets the synonyms of the specified position value by using the hold user thesaurus.protected ThesaurusManager
getThesaurus()
protected UserDetail
getUser()
static UserThesaurusHolder
holdThesaurus(UserDetail user)
-
-
-
Method Detail
-
holdThesaurus
public static UserThesaurusHolder holdThesaurus(UserDetail user)
-
forUser
public static UserDetail forUser(UserDetail user)
A convinient method to enhance the readability of the methods.- Parameters:
user
- details about a user.- Returns:
- the user details.
-
getSynonymsOf
public Collection<String> getSynonymsOf(PdcValueEntity value) throws ThesaurusException
Gets the synonyms of the specified position value by using the hold user thesaurus. The synonyms are thoses of the term backed by the value.- Parameters:
value
- the value as a PdcPositionValue instance.- Returns:
- a collection of synonyms.
- Throws:
ThesaurusException
- if an error occurs while accessing the thesaurus for getting the synonyms of the specified term.
-
getThesaurus
protected ThesaurusManager getThesaurus()
-
getUser
protected UserDetail getUser()
-
-