Interface SuggestionService
- All Known Implementing Classes:
SuggestionServiceImpl
public interface SuggestionService
Pluggable service to generate user action suggestions based on text input and contextual data.
This services aims to build more natural user interfaces for search and navigation by trying to interpret and make explicit possible user intents.
Possible usages of this service:
- make the top right JSF search box more useful with ajax auto-completion that leads to typed suggestions
- custom auto-complete field in layouts
- smart mobile application using a Content Automation operation for suggesting next operations / chains
- Since:
- 5.5
- Author:
- ogrisel
-
Method Summary
Modifier and TypeMethodDescriptionsuggest
(String userInput, SuggestionContext context) Call the suggesters registered for the given suggestion point mentioned in the context and aggregate the results.suggest
(String userInput, SuggestionContext suggestionContext, String suggester) Call a single suggester registered under the provided name.
-
Method Details
-
suggest
Call the suggesters registered for the given suggestion point mentioned in the context and aggregate the results.- Parameters:
userInput
- text typed by the usercontext
- user context (with suggestPoint name and more)- Returns:
- generated suggestion for the given input and context
- Throws:
SuggestionException
-
suggest
List<Suggestion> suggest(String userInput, SuggestionContext suggestionContext, String suggester) throws SuggestionException Call a single suggester registered under the provided name.- Parameters:
userInput
- text typed by the usersuggestionContext
- user context (with suggestPoint name and more)suggester
- the registration name of the suggester to use- Returns:
- generated suggestion for the given input and context
- Throws:
SuggestionException
-