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.
|
SuggestionHandlerRegistry |
getSuggestionHandlers()
Gets the suggestion handlers registry.
|
Object |
handleSelection(Suggestion suggestion,
SuggestionContext suggestionContext)
Call the Content Automation Operation chain matching the suggestion
selected by the user.
|
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 Object handleSelection(Suggestion suggestion, SuggestionContext suggestionContext) throws SuggestionHandlingException
SuggestionService
handleSelection
in interface SuggestionService
suggestion
- the selected suggestion to executesuggestionContext
- the suggestion context that is also passed to as Content
Automation context.SuggestionHandlingException
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()
public SuggestionHandlerRegistry getSuggestionHandlers()
Copyright © 2013 Nuxeo SA. All Rights Reserved.