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
public class JsonNoSqlChangeLogParser extends Object implements liquibase.parser.ChangeLogParser
-
-
Field Summary
Fields Modifier and Type Field Description protected liquibase.logging.Loggerlogprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapperstatic StringRAW_JSON_FIELD
-
Constructor Summary
Constructors Constructor Description JsonNoSqlChangeLogParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description liquibase.logging.LoggergetLogger()intgetPriority()protected String[]getSupportedFileExtensions()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)booleansupports(String changeLogFile, liquibase.resource.ResourceAccessor resourceAccessor)Checks if the file format is supported by an implementing ChangeLogParser and returns true if that is the case.
-
-
-
Field Detail
-
RAW_JSON_FIELD
public static final String RAW_JSON_FIELD
- See Also:
- Constant Field Values
-
log
protected liquibase.logging.Logger log
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Method Detail
-
getPriority
public int getPriority()
- Specified by:
getPriorityin interfaceliquibase.servicelocator.PrioritizedService
-
supports
public boolean supports(String changeLogFile, liquibase.resource.ResourceAccessor resourceAccessor)
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
protected String[] 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)
-
-