Class SuggestionContext
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
Object>
Base class and default implementation for passing contextual information to the suggestion service. This is primarily
a hash map to store arbitrary context element that might be useful for suggester along with a few mandatory and
common optional attributes for direct access.
- Author:
- ogrisel
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionwithCurrentDocument
(DocumentModel currentDocument) withLocale
(Locale locale) withMessages
(Map<String, String> messages) withSession
(CoreSession session) Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Field Details
-
suggesterGroup
-
principal
-
messages
-
session
-
currentDocument
-
locale
-
-
Constructor Details
-
SuggestionContext
public SuggestionContext(String suggesterGroup, Principal principal) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
-
Method Details
-
withSession
-
withCurrentDocument
-
withLocale
-
withMessages
-