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>>>
public class StringListMapContext extends BlockContext.DefaultMapContext<Collection<String>>
Block context which suitable for properties stored in aMap<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 Classes Modifier and Type Class Description static classStringListMapContext.AttributeValueYamlContext-
Nested 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 Constructor Description StringListMapContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringListMapContext.AttributeValueYamlContextgetContext(String nameOfSubcontext)Called after reading a key of map entry in YAML file and before reading its value.static StringListMapContextprefixed(String prefix)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.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, 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
-
-
-
-
Method Detail
-
prefixed
public static StringListMapContext prefixed(String prefix)
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
public StringListMapContext.AttributeValueYamlContext getContext(String nameOfSubcontext)
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:
BlockContext.DefaultObjectContext,BlockContext.DefaultListContext,BlockContext.DefaultMapContext
-
writeValue
public void writeValue(Map<String,Collection<String>> value, WritingMechanism mech)
Description copied from interface:BlockContextWrites the given value usingWritingMechanism.- Specified by:
writeValuein interfaceBlockContext<Map<String,Collection<String>>>- Overrides:
writeValuein classBlockContext.DefaultMapContext<Collection<String>>
-
-