com.silverpeas.pdc.web
Class UserThesaurusHolder

java.lang.Object
  extended by com.silverpeas.pdc.web.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
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(ThesaurusManager thesaurus, UserDetail user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

holdThesaurus

public static UserThesaurusHolder holdThesaurus(ThesaurusManager thesaurus,
                                                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()


Copyright © 2016 Silverpeas. All Rights Reserved.