Top Description Methods
liquibase.parser

public Interface ChangeLogParser

extends LiquibaseParser
Known Direct Implementers
liquibase.parser.core.sql.SqlChangeLogParser, liquibase.parser.core.xml.AbstractChangeLogParser, liquibase.parser.core.yaml.YamlChangeLogParser, liquibase.parser.AbstractFormattedChangeLogParser
Imports
liquibase.changelog.ChangeLogParameters, .DatabaseChangeLog, liquibase.exception.ChangeLogParseException, liquibase.resource.ResourceAccessor

Defines the methods a class which is able to parse a Liquibase changelog file must support. Different parsers are able to parse different file formats (e.g. XML, YAML, JSON, ...)

Method Summary

Modifier and TypeMethod and Description
public DatabaseChangeLog

Returns:

the parsed ChangeLog in object form
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
)

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

public boolean

Returns:

true if the file format is supported, false if it is not.
supports
(String
the location of the changelog file
changeLogFile
,
ResourceAccessor
the resource accessor
resourceAccessor
)

Checks if the file format is supported by an implementing ChangeLogParser and returns true if that is the case.

Method Detail

parseback to summary
public DatabaseChangeLog parse(String physicalChangeLogLocation, ChangeLogParameters changeLogParameters, ResourceAccessor resourceAccessor) throws ChangeLogParseException

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

Exceptions
ChangeLogParseException:
if an error occurs during parsing of the ChangeLog
supportsback to summary
public boolean supports(String changeLogFile, ResourceAccessor resourceAccessor)

Checks if the file format is supported by an implementing ChangeLogParser and returns true if that is the case.

Parameters
changeLogFile:String

the location of the changelog file

resourceAccessor:ResourceAccessor

the resource accessor

Returns:boolean

true if the file format is supported, false if it is not.