Top Description Fields Constructors Methods
liquibase.integration.commandline

public Class CommandLineUtils

extends Object
Class Inheritance
Imports
liquibase.CatalogAndSchema, .GlobalConfiguration, .Scope, liquibase.command.CommandScope, liquibase.command.core.DiffChangelogCommandStep, .DiffCommandStep, .GenerateChangelogCommandStep, liquibase.command.core.helpers.*, liquibase.configuration.ConfiguredValue, liquibase.database.Database, .DatabaseFactory, liquibase.database.core.DatabaseUtils, liquibase.diff.compare.CompareControl, liquibase.diff.output.DiffOutputControl, .ObjectChangeFilter, liquibase.exception.CommandExecutionException, .DatabaseException, .LiquibaseException, liquibase.resource.ClassLoaderResourceAccessor, .ResourceAccessor, liquibase.util.StringUtil, javax.xml.parsers.ParserConfigurationException, java.io.IOException, .PrintStream, java.util.ResourceBundle

Common Utility methods used in the CommandLine application and the Maven plugin. These methods were originally moved from Main so they could be shared.
Author
Peter Murray

Field Summary

Modifier and TypeField and Description
private static final ResourceBundle

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Database
createDatabaseObject(ClassLoader classLoader, String url, String username, String password, String driver, String defaultCatalogName, String defaultSchemaName, boolean outputDefaultCatalog, boolean outputDefaultSchema, String databaseClass, String driverPropertiesFile, String propertyProviderClass, String liquibaseCatalogName, String liquibaseSchemaName, String databaseChangeLogTableName, String databaseChangeLogLockTableName)
Deprecated Use ResourceAccessor version

public static Database
createDatabaseObject(ResourceAccessor resourceAccessor, String url, String username, String password, String driver, String defaultCatalogName, String defaultSchemaName, boolean outputDefaultCatalog, boolean outputDefaultSchema, String databaseClass, String driverPropertiesFile, String propertyProviderClass, String liquibaseCatalogName, String liquibaseSchemaName, String databaseChangeLogTableName, String databaseChangeLogLockTableName)
Deprecated

public static CommandScope
createDiffCommand(Database referenceDatabase, Database targetDatabase, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons, ObjectChangeFilter objectChangeFilter, PrintStream output)

public static void
doDiff(Database referenceDatabase, Database targetDatabase, String snapshotTypes)

public static void
doDiff(Database referenceDatabase, Database targetDatabase, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons)

public static void
doDiff(Database referenceDatabase, Database targetDatabase, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons, PrintStream output)

public static void
doDiff(Database referenceDatabase, Database targetDatabase, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons, ObjectChangeFilter objectChangeFilter, PrintStream output)

public static void
doDiffToChangeLog(String changeLogFile, Database referenceDatabase, Database targetDatabase, String author, DiffOutputControl diffOutputControl, ObjectChangeFilter objectChangeFilter, String snapshotTypes)
Deprecated Use version with String runOnChangeTypes, String replaceIfExistsTypes instead - doDiffToChangeLog(String, Database, Database, String, DiffOutputControl, ObjectChangeFilter, String, String, String)

public static void
doDiffToChangeLog(String changeLogFile, Database referenceDatabase, Database targetDatabase, String author, DiffOutputControl diffOutputControl, ObjectChangeFilter objectChangeFilter, String snapshotTypes, String runOnChangeTypes, String replaceIfExistsTypes)

public static void
doDiffToChangeLog(String changeLogFile, Database referenceDatabase, Database targetDatabase, String author, DiffOutputControl diffOutputControl, ObjectChangeFilter objectChangeFilter, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons)

public static void
doDiffToChangeLog(String changeLogFile, Database referenceDatabase, Database targetDatabase, String author, DiffOutputControl diffOutputControl, ObjectChangeFilter objectChangeFilter, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons, String runOnChangeTypes, String replaceIfExistsTypes)

public static void
doGenerateChangeLog(String changeLogFile, Database originalDatabase, String catalogName, String schemaName, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl)
Deprecated Use version with String runOnChangeTypes, String replaceIfExistsTypes instead - doGenerateChangeLog(String, Database, String, String, String, String, String, String, DiffOutputControl, String, String)

public static void
doGenerateChangeLog(String changeLogFile, Database originalDatabase, String catalogName, String schemaName, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl, String runOnChangeTypes, String replaceIfExistsTypes)

public static void
doGenerateChangeLog(String changeLogFile, Database originalDatabase, CatalogAndSchema[] schemas, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl)
Deprecated Use version with String runOnChangeTypes, String replaceIfExistsTypes instead - doGenerateChangeLog(String, Database, String, String, String, String, String, String, DiffOutputControl, String, String)

public static void
doGenerateChangeLog(String changeLogFile, Database originalDatabase, CatalogAndSchema[] schemas, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl, String runOnChangeTypes, String replaceIfExistsTypes)

public static void
doGenerateChangeLog(String changeLogFile, Database originalDatabase, CatalogAndSchema[] schemas, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl, boolean overwriteOutputFile)
Deprecated Use version with String runOnChangeTypes, String replaceIfExistsTypes instead - doGenerateChangeLog(String, Database, CatalogAndSchema[], String, String, String, String, DiffOutputControl, String, String)

public static void
doGenerateChangeLog(String changeLogFile, Database originalDatabase, CatalogAndSchema[] schemas, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl, boolean overwriteOutputFile, String runOnChangeTypes, String replaceIfExistsTypes)

public static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

coreBundleback to summary
private static final ResourceBundle coreBundle

Constructor Detail

CommandLineUtilsback to summary
public CommandLineUtils()

Method Detail

createDatabaseObjectback to summary
public static Database createDatabaseObject(ClassLoader classLoader, String url, String username, String password, String driver, String defaultCatalogName, String defaultSchemaName, boolean outputDefaultCatalog, boolean outputDefaultSchema, String databaseClass, String driverPropertiesFile, String propertyProviderClass, String liquibaseCatalogName, String liquibaseSchemaName, String databaseChangeLogTableName, String databaseChangeLogLockTableName) throws DatabaseException

Deprecated

Use ResourceAccessor version

createDatabaseObjectback to summary
public static Database createDatabaseObject(ResourceAccessor resourceAccessor, String url, String username, String password, String driver, String defaultCatalogName, String defaultSchemaName, boolean outputDefaultCatalog, boolean outputDefaultSchema, String databaseClass, String driverPropertiesFile, String propertyProviderClass, String liquibaseCatalogName, String liquibaseSchemaName, String databaseChangeLogTableName, String databaseChangeLogLockTableName) throws DatabaseException

Deprecated

Annotations
@SuppressWarnings:java:S2095
@Deprecated
createDiffCommandback to summary
public static CommandScope createDiffCommand(Database referenceDatabase, Database targetDatabase, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons, ObjectChangeFilter objectChangeFilter, PrintStream output) throws CommandExecutionException
doDiffback to summary
public static void doDiff(Database referenceDatabase, Database targetDatabase, String snapshotTypes) throws LiquibaseException
doDiffback to summary
public static void doDiff(Database referenceDatabase, Database targetDatabase, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons) throws LiquibaseException
doDiffback to summary
public static void doDiff(Database referenceDatabase, Database targetDatabase, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons, PrintStream output) throws LiquibaseException
doDiffback to summary
public static void doDiff(Database referenceDatabase, Database targetDatabase, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons, ObjectChangeFilter objectChangeFilter, PrintStream output) throws LiquibaseException
doDiffToChangeLogback to summary
public static void doDiffToChangeLog(String changeLogFile, Database referenceDatabase, Database targetDatabase, String author, DiffOutputControl diffOutputControl, ObjectChangeFilter objectChangeFilter, String snapshotTypes) throws LiquibaseException, IOException, ParserConfigurationException

Deprecated

Use version with String runOnChangeTypes, String replaceIfExistsTypes instead - doDiffToChangeLog(String, Database, Database, String, DiffOutputControl, ObjectChangeFilter, String, String, String)

Annotations
@Deprecated
doDiffToChangeLogback to summary
public static void doDiffToChangeLog(String changeLogFile, Database referenceDatabase, Database targetDatabase, String author, DiffOutputControl diffOutputControl, ObjectChangeFilter objectChangeFilter, String snapshotTypes, String runOnChangeTypes, String replaceIfExistsTypes) throws LiquibaseException, IOException, ParserConfigurationException
doDiffToChangeLogback to summary
public static void doDiffToChangeLog(String changeLogFile, Database referenceDatabase, Database targetDatabase, String author, DiffOutputControl diffOutputControl, ObjectChangeFilter objectChangeFilter, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons) throws LiquibaseException, IOException, ParserConfigurationException
Annotations
@Deprecated
doDiffToChangeLogback to summary
public static void doDiffToChangeLog(String changeLogFile, Database referenceDatabase, Database targetDatabase, String author, DiffOutputControl diffOutputControl, ObjectChangeFilter objectChangeFilter, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons, String runOnChangeTypes, String replaceIfExistsTypes) throws LiquibaseException, IOException, ParserConfigurationException
doGenerateChangeLogback to summary
public static void doGenerateChangeLog(String changeLogFile, Database originalDatabase, String catalogName, String schemaName, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl) throws IOException, ParserConfigurationException, LiquibaseException

Deprecated

Use version with String runOnChangeTypes, String replaceIfExistsTypes instead - doGenerateChangeLog(String, Database, String, String, String, String, String, String, DiffOutputControl, String, String)

Annotations
@Deprecated
doGenerateChangeLogback to summary
public static void doGenerateChangeLog(String changeLogFile, Database originalDatabase, String catalogName, String schemaName, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl, String runOnChangeTypes, String replaceIfExistsTypes) throws IOException, ParserConfigurationException, LiquibaseException
doGenerateChangeLogback to summary
public static void doGenerateChangeLog(String changeLogFile, Database originalDatabase, CatalogAndSchema[] schemas, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl) throws IOException, ParserConfigurationException, LiquibaseException

Deprecated

Use version with String runOnChangeTypes, String replaceIfExistsTypes instead - doGenerateChangeLog(String, Database, String, String, String, String, String, String, DiffOutputControl, String, String)

Annotations
@Deprecated
doGenerateChangeLogback to summary
public static void doGenerateChangeLog(String changeLogFile, Database originalDatabase, CatalogAndSchema[] schemas, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl, String runOnChangeTypes, String replaceIfExistsTypes) throws IOException, ParserConfigurationException, LiquibaseException
doGenerateChangeLogback to summary
public static void doGenerateChangeLog(String changeLogFile, Database originalDatabase, CatalogAndSchema[] schemas, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl, boolean overwriteOutputFile) throws IOException, ParserConfigurationException, LiquibaseException

Deprecated

Use version with String runOnChangeTypes, String replaceIfExistsTypes instead - doGenerateChangeLog(String, Database, CatalogAndSchema[], String, String, String, String, DiffOutputControl, String, String)

Annotations
@Deprecated
doGenerateChangeLogback to summary
public static void doGenerateChangeLog(String changeLogFile, Database originalDatabase, CatalogAndSchema[] schemas, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl, boolean overwriteOutputFile, String runOnChangeTypes, String replaceIfExistsTypes) throws IOException, ParserConfigurationException, LiquibaseException
getBannerback to summary
public static String getBanner()