Class BlockContext.DefaultMapContext<T>
java.lang.Object
org.keycloak.models.map.storage.file.common.BlockContext.DefaultMapContext<T>
- All Implemented Interfaces:
BlockContext<Map<String,T>>
- Direct Known Subclasses:
MapEntityContext.MapEntityMappingYamlContext,StringListMapContext
- Enclosing interface:
- BlockContext<V>
public static class BlockContext.DefaultMapContext<T>
extends Object
implements BlockContext<Map<String,T>>
-
Nested Class Summary
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidModifies theresult returnedfrom within this context by providing the read mapping entrynameto givenvalue.getContext(String nameOfSubcontext) Called after reading a key of map entry in YAML file and before reading its value.Returns the result of parsing the given part of YAML file.static BlockContext.DefaultMapContext<Object>voidwriteValue(Map<String, T> value, WritingMechanism mech) Writes the given value usingWritingMechanism.Methods 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
-
Field Details
-
itemClass
-
-
Constructor Details
-
DefaultMapContext
-
-
Method Details
-
newDefaultMapContext
-
getScalarType
- Specified by:
getScalarTypein interfaceBlockContext<T>
-
add
Description copied from interface:BlockContextModifies theresult returnedfrom within this context by providing the read mapping entrynameto givenvalue.Called after reading a map entry (both key and value) from the YAML file is finished. The entry is represented as
nameparameter (key part of the entry) andvalue(value part of the entry).The method is called in the same order as the mapping items appear in the source YAML mapping.
- Specified by:
addin interfaceBlockContext<T>
-
getResult
Description copied from interface:BlockContextReturns the result of parsing the given part of YAML file.- Specified by:
getResultin interfaceBlockContext<T>- Returns:
-
writeValue
Description copied from interface:BlockContextWrites the given value usingWritingMechanism.- Specified by:
writeValuein interfaceBlockContext<T>
-
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<T>- 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:
-