Class LiquibaseFactory

java.lang.Object
org.qubership.atp.dataset.db.migration.LiquibaseFactory

public class LiquibaseFactory extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    liquibase.Liquibase
    create(String pathToChangeLog)
    Creates liquibase facade for target changelog file.
    liquibase.Liquibase
    create(String pathToChangeLog, liquibase.resource.ResourceAccessor resourceAccessor)
    Creates liquibase facade for target changelog file, with custom resource accessor (ClassLoader).

    Methods inherited from class java.lang.Object

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

    • LiquibaseFactory

      @Autowired public LiquibaseFactory(DataSource dataSource)
  • Method Details

    • create

      public liquibase.Liquibase create(String pathToChangeLog) throws SQLException, liquibase.exception.LiquibaseException
      Creates liquibase facade for target changelog file.
      Parameters:
      pathToChangeLog - like 'install.xml'
      Returns:
      Liquibase facade
      Throws:
      SQLException - if connection can not be acquired
      liquibase.exception.LiquibaseException - if db implementation not found
    • create

      public liquibase.Liquibase create(String pathToChangeLog, liquibase.resource.ResourceAccessor resourceAccessor) throws SQLException, liquibase.exception.LiquibaseException
      Creates liquibase facade for target changelog file, with custom resource accessor (ClassLoader).
      Parameters:
      pathToChangeLog - path to xml file with changelogs
      resourceAccessor - custom class loader
      Throws:
      SQLException
      liquibase.exception.LiquibaseException