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 classYamlSerializer.LiquibaseRepresenterstatic classYamlSerializer.LiquibaseResolver
-
Field Summary
Fields Modifier and Type Field Description protected org.yaml.snakeyaml.Yamlyaml-
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 ObjectconvertToMap(List valueAsList, int index)protected org.yaml.snakeyaml.DumperOptionscreateDumperOptions()protected org.yaml.snakeyaml.YamlcreateYaml()protected Comparator<String>getComparator(LiquibaseSerializable object)protected YamlSerializer.LiquibaseRepresentergetLiquibaseRepresenter(org.yaml.snakeyaml.DumperOptions options)protected YamlSerializer.LiquibaseResolvergetLiquibaseResolver()protected Set<String>getSerializableObjectFields(LiquibaseSerializable object)String[]getValidFileExtensions()protected booleanisJson()static StringremoveClassTypeMarksFromSerializedJson(String json)Stringserialize(LiquibaseSerializable object, boolean pretty)protected ObjecttoMap(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:
getValidFileExtensionsin interfaceLiquibaseSerializer
-
serialize
public String serialize(LiquibaseSerializable object, boolean pretty)
- Specified by:
serializein interfaceLiquibaseSerializer
-
getSerializableObjectFields
protected Set<String> getSerializableObjectFields(LiquibaseSerializable object)
-
toMap
protected Object toMap(LiquibaseSerializable object)
-
getComparator
protected Comparator<String> getComparator(LiquibaseSerializable object)
-
-