Class StringListMapContext
java.lang.Object
org.keycloak.models.map.storage.file.common.BlockContext.DefaultMapContext<Collection<String>>
org.keycloak.models.map.storage.file.common.StringListMapContext
- All Implemented Interfaces:
BlockContext<Map<String,Collection<String>>>
Block context which suitable for properties stored in a
Map<String, List<String>>
which accepts string mapping key, and entry value is recognized both as a plain value
(converted to string) or a list of values- Author:
- hmlnarik
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.keycloak.models.map.storage.file.common.BlockContext
BlockContext.DefaultListContext<T>, BlockContext.DefaultMapContext<T>, BlockContext.DefaultObjectContext<T> -
Field Summary
Fields inherited from class org.keycloak.models.map.storage.file.common.BlockContext.DefaultMapContext
itemClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetContext(String nameOfSubcontext) Called after reading a key of map entry in YAML file and before reading its value.static StringListMapContextReturns a YAML attribute-like context where key of each element is stored in YAML file without a given prefix, and in the internal representation each key has that prefix.voidwriteValue(Map<String, Collection<String>> value, WritingMechanism mech) Writes the given value usingWritingMechanism.Methods inherited from class org.keycloak.models.map.storage.file.common.BlockContext.DefaultMapContext
add, getResult, getScalarType, newDefaultMapContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.map.storage.file.common.BlockContext
add
-
Constructor Details
-
StringListMapContext
public StringListMapContext()
-
-
Method Details
-
prefixed
Returns a YAML attribute-like context where key of each element is stored in YAML file without a given prefix, and in the internal representation each key has that prefix.- Parameters:
prefix-- Returns:
-
getContext
Description copied from interface:BlockContextCalled after reading a key of map entry in YAML file and before reading its value. The key of the entry is represented asnameOfSubcontextparameter, and provides means to specify aYamlContextfor transforming the mapping value into appropriate Java object.- Specified by:
getContextin interfaceBlockContext<Map<String,Collection<String>>> - Overrides:
getContextin classBlockContext.DefaultMapContext<Collection<String>>- Parameters:
nameOfSubcontext- Key of the map entry- Returns:
- Context used for transforming the value,
or
nullif the default primitive / sequence / mapping context should be used instead. - See Also:
-
writeValue
Description copied from interface:BlockContextWrites the given value usingWritingMechanism.- Specified by:
writeValuein interfaceBlockContext<Map<String,Collection<String>>> - Overrides:
writeValuein classBlockContext.DefaultMapContext<Collection<String>>
-