Class YamlWritingMechanism
- java.lang.Object
-
- org.keycloak.models.map.storage.file.yaml.YamlWritingMechanism
-
- All Implemented Interfaces:
Closeable,AutoCloseable,WritingMechanism
public class YamlWritingMechanism extends Object implements WritingMechanism, Closeable
Mechanism which producesEvents for SnakeYaml v2Emitter.- Author:
- vramik
-
-
Constructor Summary
Constructors Constructor Description YamlWritingMechanism(Consumer<org.snakeyaml.engine.v2.events.Event> consumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()YamlWritingMechanismwriteMapping(Runnable task)Writes a mapping, items of which are written using this mechanism in thetask.YamlWritingMechanismwriteObject(Object value)Writes a value of a primitive type (null, boolean, number, String).YamlWritingMechanismwritePair(String key, Runnable task)Writes a mapping key/value pair, items of which are written using this mechanism in thetask.YamlWritingMechanismwriteSequence(Runnable task)Writes a sequence, items of which are written using this mechanism in thetask.
-
-
-
Constructor Detail
-
YamlWritingMechanism
public YamlWritingMechanism(Consumer<org.snakeyaml.engine.v2.events.Event> consumer)
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
writeMapping
public YamlWritingMechanism writeMapping(Runnable task)
Description copied from interface:WritingMechanismWrites a mapping, items of which are written using this mechanism in thetask.- Specified by:
writeMappingin interfaceWritingMechanism- Returns:
-
writeSequence
public YamlWritingMechanism writeSequence(Runnable task)
Description copied from interface:WritingMechanismWrites a sequence, items of which are written using this mechanism in thetask.- Specified by:
writeSequencein interfaceWritingMechanism- Returns:
-
writePair
public YamlWritingMechanism writePair(String key, Runnable task)
Description copied from interface:WritingMechanismWrites a mapping key/value pair, items of which are written using this mechanism in thetask.- Specified by:
writePairin interfaceWritingMechanism- Returns:
-
writeObject
public YamlWritingMechanism writeObject(Object value)
Description copied from interface:WritingMechanismWrites a value of a primitive type (null, boolean, number, String).- Specified by:
writeObjectin interfaceWritingMechanism- Returns:
-
-