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 StringListMapContext
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.void
writeValue
(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, newDefaultMapContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:BlockContext
Called after reading a key of map entry in YAML file and before reading its value. The key of the entry is represented asnameOfSubcontext
parameter, and provides means to specify aYamlContext
for transforming the mapping value into appropriate Java object.- Specified by:
getContext
in interfaceBlockContext<Map<String,
Collection<String>>> - Overrides:
getContext
in classBlockContext.DefaultMapContext<Collection<String>>
- Parameters:
nameOfSubcontext
- Key of the map entry- Returns:
- Context used for transforming the value,
or
null
if the default primitive / sequence / mapping context should be used instead. - See Also:
-
writeValue
Description copied from interface:BlockContext
Writes the given value usingWritingMechanism
.- Specified by:
writeValue
in interfaceBlockContext<Map<String,
Collection<String>>> - Overrides:
writeValue
in classBlockContext.DefaultMapContext<Collection<String>>
-