Class LiquibaseResourceAccessor

java.lang.Object
org.frankframework.jdbc.migration.LiquibaseResourceAccessor
All Implemented Interfaces:
AutoCloseable, liquibase.resource.ResourceAccessor

public class LiquibaseResourceAccessor extends Object implements liquibase.resource.ResourceAccessor
Liquibase ResourceAccessor that can return a resource supplied at construction time. This allows to generate scripts from an uploaded changelog file.
Author:
Niels Meijer
  • Constructor Details

    • LiquibaseResourceAccessor

      public LiquibaseResourceAccessor(Resource resource)
  • Method Details

    • search

      public List<liquibase.resource.Resource> search(String path, boolean recursive) throws IOException
      This method is primarily used by Liquibase to get the xsd (/www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd) to validate against. (the path literally contains www.liquibase.org !) Since the XSD is in the jar file and we do not want to override it, simply return null. Then the default XSD in the Liquibase jar will be used.
      Specified by:
      search in interface liquibase.resource.ResourceAccessor
      Throws:
      IOException
    • asResourceList

      protected List<liquibase.resource.Resource> asResourceList(String path, URI uri, ThrowingSupplier<InputStream,IOException> inputStreamSupplier)
    • getAll

      public List<liquibase.resource.Resource> getAll(String path) throws IOException
      Specified by:
      getAll in interface liquibase.resource.ResourceAccessor
      Throws:
      IOException
    • describeLocations

      public List<String> describeLocations()
      Specified by:
      describeLocations in interface liquibase.resource.ResourceAccessor
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception