public class SuggestionServiceImpl extends DefaultComponent implements SuggestionService
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, unregisterExtension
public List<Suggestion> suggest(String userInput, SuggestionContext context) throws SuggestionException
SuggestionService
suggest
in interface SuggestionService
userInput
- text typed by the usercontext
- user context (with suggestPoint name and more)SuggestionException
public List<Suggestion> suggest(String input, SuggestionContext context, String suggesterName) throws SuggestionException
SuggestionService
suggest
in interface SuggestionService
context
- user context (with suggestPoint name and more)suggesterName
- the registration name of the suggester to useSuggestionException
public void activate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution
in class DefaultComponent
Exception
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution
in class DefaultComponent
Exception
public SuggesterGroupRegistry getSuggesterGroups()
Copyright © 2014 Nuxeo SA. All rights reserved.