Top Fields Constructors Methods
liquibase.parser.core.yaml

public Class YamlChangeLogParser

extends YamlParser
implements ChangeLogParser
Class Inheritance
All Implemented Interfaces
liquibase.parser.ChangeLogParser, liquibase.parser.LiquibaseParser, liquibase.servicelocator.PrioritizedService
Known Direct Subclasses
liquibase.parser.core.json.JsonChangeLogParser
Imports
liquibase.ContextExpression, .Labels, .Scope, liquibase.changelog.ChangeLogParameters, .DatabaseChangeLog, liquibase.exception.ChangeLogParseException, .LiquibaseException, .UnexpectedLiquibaseException, liquibase.parser.ChangeLogParser, liquibase.parser.core.ParsedNode, liquibase.resource.Resource, .ResourceAccessor, liquibase.util.FileUtil, org.yaml.snakeyaml.Yaml, org.yaml.snakeyaml.constructor.SafeConstructor, java.io.IOException, .InputStream, java.util.*

Field Summary

Modifier and TypeField and Description
private static final String
Inherited from liquibase.parser.core.yaml.YamlParser:
log

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private Boolean

Returns:

the global param
getGlobalParam
(Map<K, V>
the map of props
property
)

Extract the global parameter from the properties.

private void
loadChangeLogParametersFromFile(ChangeLogParameters changeLogParameters, ResourceAccessor resourceAccessor, DatabaseChangeLog changeLog, Map<K, V> property, ContextExpression context, Labels labels, Boolean global)

public DatabaseChangeLog
parse(String
the physical location of the changelog. The exact file formats and locations where can load changelog files from depend on the implementations and capabilities of the implementing parsers.
physicalChangeLogLocation
,
ChangeLogParameters
parameters given by the end user that should be applied while parsing the changelog (i.e. replacement of ${placeholders} inside the changelogs with user-defined content)
changeLogParameters
,
ResourceAccessor
a Java resource accessor
resourceAccessor
)

Implements liquibase.parser.ChangeLogParser.parse.

Parses a Liquibase database changelog and returns the parsed form as an object.

private Map<K, V>
parseYamlStream(String physicalChangeLogLocation, Yaml yaml, InputStream changeLogStream)

protected void
replaceParameters(Object obj, ChangeLogParameters changeLogParameters, DatabaseChangeLog changeLog)

Inherited from liquibase.parser.core.yaml.YamlParser:
createLoaderOptionsgetPrioritygetSupportedFileExtensionssupports

Field Detail

DATABASE_CHANGE_LOGback to summary
private static final String DATABASE_CHANGE_LOG

Constructor Detail

YamlChangeLogParserback to summary
public YamlChangeLogParser()

Method Detail

getGlobalParamback to summary
private Boolean getGlobalParam(Map<K, V> property)

Extract the global parameter from the properties.

Parameters
property:Map<K, V>

the map of props

Returns:Boolean

the global param

loadChangeLogParametersFromFileback to summary
private void loadChangeLogParametersFromFile(ChangeLogParameters changeLogParameters, ResourceAccessor resourceAccessor, DatabaseChangeLog changeLog, Map<K, V> property, ContextExpression context, Labels labels, Boolean global) throws IOException, LiquibaseException
parseback to summary
public DatabaseChangeLog parse(String physicalChangeLogLocation, ChangeLogParameters changeLogParameters, ResourceAccessor resourceAccessor) throws ChangeLogParseException

Implements liquibase.parser.ChangeLogParser.parse.

Doc from liquibase.parser.ChangeLogParser.parse.

Parses a Liquibase database changelog and returns the parsed form as an object.

Parameters
physicalChangeLogLocation:String

the physical location of the changelog. The exact file formats and locations where can load changelog files from depend on the implementations and capabilities of the implementing parsers.

changeLogParameters:ChangeLogParameters

parameters given by the end user that should be applied while parsing the changelog (i.e. replacement of ${placeholders} inside the changelogs with user-defined content)

resourceAccessor:ResourceAccessor

a Java resource accessor

Returns:DatabaseChangeLog

the parsed ChangeLog in object form

Annotations
@Override
Exceptions
ChangeLogParseException:
if an error occurs during parsing of the ChangeLog
parseYamlStreamback to summary
private Map<K, V> parseYamlStream(String physicalChangeLogLocation, Yaml yaml, InputStream changeLogStream) throws ChangeLogParseException
replaceParametersback to summary
protected void replaceParameters(Object obj, ChangeLogParameters changeLogParameters, DatabaseChangeLog changeLog) throws ChangeLogParseException