Class UserGroupLookupSuggester
- java.lang.Object
-
- org.nuxeo.ecm.platform.suggestbox.service.suggesters.UserGroupLookupSuggester
-
- All Implemented Interfaces:
Suggester
public class UserGroupLookupSuggester extends Object implements Suggester
Perform a lookup by name query on the UserManager service and suggest to navigate to the top user and / or group profiles matching that query. If searchFields are provided in the parameters, suggestion for searching document with reference to the users are also generated.- Author:
- ogrisel
-
-
Field Summary
Fields Modifier and Type Field Description protected SuggesterDescriptordescriptorprotected StringgroupIconURLprotected intgroupSuggestionsLimitprotected List<String>searchFieldsprotected StringsearchIconURLprotected StringsearchLabelPrefixprotected StringsuggesterIdprotected StringuserIconURLprotected intuserSuggestionsLimit
-
Constructor Summary
Constructors Constructor Description UserGroupLookupSuggester()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitWithParameters(SuggesterDescriptor descriptor)Configure the Suggester instance with the parameters from the XML descriptor.List<Suggestion>suggest(String userInput, SuggestionContext context)Compute a list of possible user actions or intents given their input and context.
-
-
-
Field Detail
-
userIconURL
protected String userIconURL
-
groupIconURL
protected String groupIconURL
-
searchIconURL
protected String searchIconURL
-
descriptor
protected SuggesterDescriptor descriptor
-
searchFields
protected List<String> searchFields
-
searchLabelPrefix
protected final String searchLabelPrefix
- See Also:
- Constant Field Values
-
userSuggestionsLimit
protected int userSuggestionsLimit
-
groupSuggestionsLimit
protected int groupSuggestionsLimit
-
suggesterId
protected String suggesterId
-
-
Constructor Detail
-
UserGroupLookupSuggester
public UserGroupLookupSuggester()
-
-
Method Detail
-
suggest
public List<Suggestion> suggest(String userInput, SuggestionContext context) throws SuggestionException
Description copied from interface:SuggesterCompute a list of possible user actions or intents given their input and context.- Specified by:
suggestin interfaceSuggester- Parameters:
userInput- text typed by the usercontext- user context- Returns:
- generated suggestion for the given input and context
- Throws:
SuggestionException- if the configuration or context are inconsistent, or a backing service is failing.
-
initWithParameters
public void initWithParameters(SuggesterDescriptor descriptor)
Description copied from interface:SuggesterConfigure the Suggester instance with the parameters from the XML descriptor.- Specified by:
initWithParametersin interfaceSuggester- Parameters:
descriptor- XMap descriptor with the aggregate configuration information of the component.
-
-