Package liquibase.nosql.parser.json
Class JsonNoSqlChangeLogParser
java.lang.Object
liquibase.nosql.parser.json.JsonNoSqlChangeLogParser
- All Implemented Interfaces:
liquibase.parser.ChangeLogParser,liquibase.parser.LiquibaseParser,liquibase.servicelocator.PrioritizedService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected liquibase.logging.Loggerprotected com.fasterxml.jackson.databind.ObjectMapperstatic final StringFields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionliquibase.logging.Loggerintprotected String[]liquibase.changelog.DatabaseChangeLogparse(String physicalChangeLogLocation, liquibase.changelog.ChangeLogParameters changeLogParameters, liquibase.resource.ResourceAccessor resourceAccessor) Parses a Liquibase database changelog and returns the parsed form as an object.protected voidreplaceParameters(com.fasterxml.jackson.core.TreeNode obj, liquibase.changelog.ChangeLogParameters changeLogParameters, liquibase.changelog.DatabaseChangeLog changeLog) booleanChecks if the file format is supported by an implementing ChangeLogParser and returns true if that is the case.
-
Field Details
-
RAW_JSON_FIELD
- See Also:
-
log
protected liquibase.logging.Logger log -
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
JsonNoSqlChangeLogParser
public JsonNoSqlChangeLogParser()
-
-
Method Details
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfaceliquibase.servicelocator.PrioritizedService
-
supports
Checks if the file format is supported by an implementing ChangeLogParser and returns true if that is the case.- Specified by:
supportsin interfaceliquibase.parser.ChangeLogParser- Parameters:
changeLogFile- the location of the changelog fileresourceAccessor- the resource accessor- Returns:
- true if the file format is supported, false if it is not.
-
getSupportedFileExtensions
-
getLogger
public liquibase.logging.Logger getLogger() -
parse
public liquibase.changelog.DatabaseChangeLog parse(String physicalChangeLogLocation, liquibase.changelog.ChangeLogParameters changeLogParameters, liquibase.resource.ResourceAccessor resourceAccessor) throws liquibase.exception.ChangeLogParseException Parses a Liquibase database changelog and returns the parsed form as an object.- Specified by:
parsein interfaceliquibase.parser.ChangeLogParser- Parameters:
physicalChangeLogLocation- the physical location of the changelog. The exakt file formats and locations where can load changelog files from depend on the implementations and capabilities of the implementing parsers.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- a Java resource accessor- Returns:
- the parsed ChangeLog in object form
- Throws:
liquibase.exception.ChangeLogParseException- if an error occurs during parsing of the ChangeLog
-
replaceParameters
protected void replaceParameters(com.fasterxml.jackson.core.TreeNode obj, liquibase.changelog.ChangeLogParameters changeLogParameters, liquibase.changelog.DatabaseChangeLog changeLog)
-