public class SuggestionServiceImpl extends DefaultComponent implements SuggestionService
| Modifier and Type | Field and Description |
|---|---|
protected SuggesterGroupRegistry |
suggesterGroups |
protected SuggesterRegistry |
suggesters |
lastModified| Constructor and Description |
|---|
SuggestionServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(ComponentContext context)
Activates the component.
|
SuggesterGroupRegistry |
getSuggesterGroups()
Gets the suggester groups registry.
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
List<Suggestion> |
suggest(String userInput,
SuggestionContext context)
Call the suggesters registered for the given suggestion point mentioned in the context and aggregate the results.
|
List<Suggestion> |
suggest(String input,
SuggestionContext context,
String suggesterName)
Call a single suggester registered under the provided name.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtensionprotected SuggesterGroupRegistry suggesterGroups
protected SuggesterRegistry suggesters
public SuggestionServiceImpl()
public List<Suggestion> suggest(String userInput, SuggestionContext context) throws SuggestionException
SuggestionServicesuggest in interface SuggestionServiceuserInput - text typed by the usercontext - user context (with suggestPoint name and more)SuggestionExceptionpublic List<Suggestion> suggest(String input, SuggestionContext context, String suggesterName) throws SuggestionException
SuggestionServicesuggest in interface SuggestionServicecontext - user context (with suggestPoint name and more)suggesterName - the registration name of the suggester to useSuggestionExceptionpublic void activate(ComponentContext context)
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic SuggesterGroupRegistry getSuggesterGroups()
Copyright © 2016 Nuxeo SA. All rights reserved.