Package liquibase.serializer.core.yaml
Class YamlSerializer
- java.lang.Object
-
- liquibase.serializer.core.yaml.YamlSerializer
-
- All Implemented Interfaces:
LiquibaseSerializer
,PrioritizedService
- Direct Known Subclasses:
YamlChangeLogSerializer
,YamlSnapshotSerializer
public abstract class YamlSerializer extends Object implements LiquibaseSerializer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
YamlSerializer.LiquibaseRepresenter
static class
YamlSerializer.LiquibaseResolver
-
Field Summary
Fields Modifier and Type Field Description protected org.yaml.snakeyaml.Yaml
yaml
-
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description YamlSerializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
convertToMap(List valueAsList, int index)
protected org.yaml.snakeyaml.DumperOptions
createDumperOptions()
protected org.yaml.snakeyaml.Yaml
createYaml()
protected Comparator<String>
getComparator(LiquibaseSerializable object)
protected YamlSerializer.LiquibaseRepresenter
getLiquibaseRepresenter(org.yaml.snakeyaml.DumperOptions options)
protected YamlSerializer.LiquibaseResolver
getLiquibaseResolver()
protected Set<String>
getSerializableObjectFields(LiquibaseSerializable object)
String[]
getValidFileExtensions()
protected boolean
isJson()
static String
removeClassTypeMarksFromSerializedJson(String json)
String
serialize(LiquibaseSerializable object, boolean pretty)
protected Object
toMap(LiquibaseSerializable object)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface liquibase.servicelocator.PrioritizedService
getPriority
-
-
-
-
Method Detail
-
createDumperOptions
protected org.yaml.snakeyaml.DumperOptions createDumperOptions()
-
createYaml
protected org.yaml.snakeyaml.Yaml createYaml()
-
getLiquibaseRepresenter
protected YamlSerializer.LiquibaseRepresenter getLiquibaseRepresenter(org.yaml.snakeyaml.DumperOptions options)
-
getLiquibaseResolver
protected YamlSerializer.LiquibaseResolver getLiquibaseResolver()
-
isJson
protected boolean isJson()
-
getValidFileExtensions
public String[] getValidFileExtensions()
- Specified by:
getValidFileExtensions
in interfaceLiquibaseSerializer
-
serialize
public String serialize(LiquibaseSerializable object, boolean pretty)
- Specified by:
serialize
in interfaceLiquibaseSerializer
-
getSerializableObjectFields
protected Set<String> getSerializableObjectFields(LiquibaseSerializable object)
-
toMap
protected Object toMap(LiquibaseSerializable object)
-
getComparator
protected Comparator<String> getComparator(LiquibaseSerializable object)
-
-