Class BlockContext.DefaultObjectContext<T>
java.lang.Object
org.keycloak.models.map.storage.file.common.BlockContext.DefaultObjectContext<T>
- All Implemented Interfaces:
BlockContext<T>
- Enclosing interface:
- BlockContext<V>
-
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>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Modifies theresult returned
from within this context by providing the read primitive value or a single sequence item in thevalue
parameter.BlockContext<?>
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.void
writeValue
(Object 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, wait
Methods inherited from interface org.keycloak.models.map.storage.file.common.BlockContext
add
-
Constructor Details
-
DefaultObjectContext
-
-
Method Details
-
newDefaultObjectContext
-
getScalarType
- Specified by:
getScalarType
in interfaceBlockContext<T>
-
add
Description copied from interface:BlockContext
Modifies theresult returned
from within this context by providing the read primitive value or a single sequence item in thevalue
parameter.Called after reading a primitive value or a single sequence item from the YAML file is finished.
If the parsed YAML part was a sequence, this method is called in the same order as the sequence items appear in the source YAML sequence.
- Specified by:
add
in interfaceBlockContext<T>
-
getResult
Description copied from interface:BlockContext
Returns the result of parsing the given part of YAML file.- Specified by:
getResult
in interfaceBlockContext<T>
- Returns:
-
writeValue
Description copied from interface:BlockContext
Writes the given value usingWritingMechanism
.- Specified by:
writeValue
in interfaceBlockContext<T>
-
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<T>
- 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:
-