Class LiquibaseConfigurationProperties

java.lang.Object
io.micronaut.liquibase.LiquibaseConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.util.Toggleable

@EachProperty("liquibase.datasources") public class LiquibaseConfigurationProperties extends Object implements io.micronaut.core.util.Toggleable
Create a Liquibase Configuration for each sub-property of liquibase.datasources.*.
Since:
1.0.0
Author:
Sergio del Amo
  • Field Details

    • DEFAULT_ENABLED

      public static final boolean DEFAULT_ENABLED
      The default enable value.
      See Also:
    • DEFAULT_DROPFIRST

      public static final boolean DEFAULT_DROPFIRST
      The default dropFirst value.
      See Also:
    • DEFAULT_TESTROLLBACKONUPDATE

      public static final boolean DEFAULT_TESTROLLBACKONUPDATE
      The default testRollbackOnUpdate value.
      See Also:
    • DEFAULT_ASYNC

      public static final boolean DEFAULT_ASYNC
      The default async value.
      See Also:
  • Constructor Details

    • LiquibaseConfigurationProperties

      public LiquibaseConfigurationProperties(@Parameter String name)
      Parameters:
      name - name qualifier.
  • Method Details

    • setTestRollbackOnUpdate

      public void setTestRollbackOnUpdate(boolean testRollbackOnUpdate)
      Whether rollback should be tested before update is performed. Default value (false).
      Parameters:
      testRollbackOnUpdate - Whether rollback should be tested before update is performed.
    • isTestRollbackOnUpdate

      public boolean isTestRollbackOnUpdate()
      Returns whether a rollback should be tested at update time or not.
      Returns:
      Whether a rollback should be tested at update time or not.
    • getDatabaseChangeLogLockTable

      public String getDatabaseChangeLogLockTable()
      Name of table to use for tracking concurrent Liquibase usage.
      Returns:
      the name of table to use for tracking concurrent Liquibase usage.
    • setDatabaseChangeLogLockTable

      public void setDatabaseChangeLogLockTable(String databaseChangeLogLockTable)
      Name of table to use for tracking concurrent Liquibase usage.
      Parameters:
      databaseChangeLogLockTable - the name of table to use for tracking concurrent Liquibase usage.
    • getDatabaseChangeLogTable

      public String getDatabaseChangeLogTable()
      Name of table to use for tracking change history.
      Returns:
      the name of table to use for tracking change history.
    • setDatabaseChangeLogTable

      public void setDatabaseChangeLogTable(String databaseChangeLogTable)
      Name of table to use for tracking change history.
      Parameters:
      databaseChangeLogTable - the name of table to use for tracking change history.
    • getLiquibaseTablespace

      public String getLiquibaseTablespace()
      Tablespace to use for Liquibase objects.
      Returns:
      the tablespace to use for Liquibase objects.
    • setLiquibaseTablespace

      public void setLiquibaseTablespace(String liquibaseTablespace)
      Tablespace to use for Liquibase objects.
      Parameters:
      liquibaseTablespace - the tablespace to use for Liquibase objects.
    • getLiquibaseSchema

      public String getLiquibaseSchema()
      Schema to use for Liquibase objects.
      Returns:
      Schema to use for Liquibase objects.
    • setLiquibaseSchema

      public void setLiquibaseSchema(String liquibaseSchema)
      Schema to use for Liquibase objects.
      Parameters:
      liquibaseSchema - Schema to use for Liquibase objects.
    • getChangeLog

      public String getChangeLog()
      Returns:
      the liquibase changelog
    • setChangeLog

      public void setChangeLog(String changeLog)
      Change log configuration path.
      Parameters:
      changeLog - sets the change log configuration path.
    • setRollbackFilePath

      public void setRollbackFilePath(String rollbackFilePath)
      Path to file to which rollback SQL is written when an update is performed.
      Parameters:
      rollbackFilePath - Path to file to which rollback SQL is written when an update is performed.
    • getRollbackFilePath

      public String getRollbackFilePath()
      Returns:
      the path to file to which rollback SQL is written when an update is performed.
    • getRollbackFile

      public File getRollbackFile()
      Returns:
      the file to which rollback SQL is written when an update is performed.
    • isDropFirst

      public boolean isDropFirst()
      Returns:
      true if database schema should be drop before running liquibase operations.
    • setDropFirst

      public void setDropFirst(boolean dropFirst)
      Whether to first drop the database schema. Default value (false).
      Parameters:
      dropFirst - True to drop the schema.
    • getDefaultSchema

      public String getDefaultSchema()
      Returns:
      the default database schema.
    • setDefaultSchema

      public void setDefaultSchema(String defaultSchema)
      Default database schema.
      Parameters:
      defaultSchema - Sets the default database schema.
    • getParameters

      public Map<String,String> getParameters()
      Returns:
      the change log parameters.
    • setParameters

      public void setParameters(Map<String,String> parameters)
      Change log parameters.
      Parameters:
      parameters - Change log parameters
    • getTag

      public String getTag()
      Returns:
      the liquibase tag.
    • setTag

      public void setTag(String tag)
      Parameters:
      tag - a tag.
    • getContexts

      public String getContexts()
      Comma-separated list of runtime contexts to use.
      Returns:
      a comma-separated list of runtime contexts to use.
    • setContexts

      public void setContexts(String contexts)
      Comma-separated list of runtime contexts to use.
      Parameters:
      contexts - a comma-separated list of runtime contexts to use.
    • getLabels

      public String getLabels()
      Comma-separated list of runtime labels to use.
      Returns:
      A Comma-separated list of runtime labels to use
    • setLabels

      public void setLabels(String labels)
      Comma-separated list of runtime labels to use.
      Parameters:
      labels - A Comma-separated list of runtime labels to use
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
    • setEnabled

      public void setEnabled(boolean enabled)
      Sets whether this liquibase configuration is enabled. Default value (true).
      Parameters:
      enabled - True if it is enabled
    • getNameQualifier

      public String getNameQualifier()
      Returns:
      name qualifier associated with this liquibase configuration.
    • setAsync

      public void setAsync(boolean async)
      Whether liquibase operations should be run asynchronously.
      Parameters:
      async - true to run liquibase operations asynchronously
    • isAsync

      public boolean isAsync()
      Returns:
      true if liquibase operations should be run asynchronously.