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.Logger
     
    protected com.fasterxml.jackson.databind.ObjectMapper
     
    static final String
     

    Fields inherited from interface liquibase.servicelocator.PrioritizedService

    COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    liquibase.logging.Logger
     
    int
     
    protected String[]
     
    liquibase.changelog.DatabaseChangeLog
    parse(String physicalChangeLogLocation, liquibase.changelog.ChangeLogParameters changeLogParameters, liquibase.resource.ResourceAccessor resourceAccessor)
    Parses a Liquibase database changelog and returns the parsed form as an object.
    protected void
    replaceParameters(com.fasterxml.jackson.core.TreeNode obj, liquibase.changelog.ChangeLogParameters changeLogParameters, liquibase.changelog.DatabaseChangeLog changeLog)
     
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • RAW_JSON_FIELD

      public static final String 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:
      getPriority in interface liquibase.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:
      supports in interface liquibase.parser.ChangeLogParser
      Parameters:
      changeLogFile - the location of the changelog file
      resourceAccessor - 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:
      parse in interface liquibase.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)