Class 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 log  
      protected com.fasterxml.jackson.databind.ObjectMapper objectMapper  
      static String RAW_JSON_FIELD  
      • Fields inherited from interface liquibase.servicelocator.PrioritizedService

        COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      liquibase.logging.Logger getLogger()  
      int getPriority()  
      protected String[] getSupportedFileExtensions()  
      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.
    • Field Detail

      • log

        protected liquibase.logging.Logger log
      • objectMapper

        protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
    • Constructor Detail

      • JsonNoSqlChangeLogParser

        public JsonNoSqlChangeLogParser()
    • Method Detail

      • 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)