public abstract class BaseLiquibaseTask
extends Task
Modifier and Type | Class and Description |
---|---|
static class |
BaseLiquibaseTask.ChangeLogProperty
Deprecated.
Use
ChangeLogParametersType instead. |
protected static class |
BaseLiquibaseTask.LogRedirector
Deprecated.
|
Constructor and Description |
---|
BaseLiquibaseTask() |
Modifier and Type | Method and Description |
---|---|
void |
addChangeLogParameters(ChangeLogParametersType changeLogParameters) |
void |
addConfiguredChangeLogProperty(BaseLiquibaseTask.ChangeLogProperty changeLogProperty)
Deprecated.
|
void |
addDatabase(DatabaseType databaseType) |
protected void |
closeDatabase(Database database)
Convenience method to safely close the database connection.
|
protected void |
closeDatabase(Liquibase liquibase)
Deprecated.
Use
closeDatabase(liquibase.database.Database) instead. |
Path |
createClasspath() |
protected Database |
createDatabaseFromConfiguredDatabaseType() |
protected Database |
createDatabaseFromType(DatabaseType databaseType) |
protected Database |
createDatabaseObject(String driverClassName,
String databaseUrl,
String username,
String password,
String defaultCatalogName,
String defaultSchemaName,
String databaseClass)
Deprecated.
Use
createDatabaseFromType(DatabaseType) instead. |
protected Liquibase |
createLiquibase()
Deprecated.
The Liquibase class is now created automatically when the Ant task is executed. Use
getLiquibase() instead. |
Writer |
createOutputWriter()
Deprecated.
Subclasses of this class should either instantiate their own output writers or use
AbstractChangeLogBasedTask if their task involves a change log. |
PrintStream |
createPrintStream()
Deprecated.
Subclasses of this class should either instantiate their own output writers or use
AbstractChangeLogBasedTask if the task involves a change log. |
void |
execute() |
protected abstract void |
executeWithLiquibaseClassloader() |
String |
getChangeLogDirectory()
This method is designed to be overridden by subclasses when a change log is needed.
|
protected String |
getChangeLogFile()
This method is designed to be overridden by subclasses when a change log is needed.
|
String |
getContexts()
This method no longer does anything.
|
String |
getCurrentDateTimeFunction()
Deprecated.
Use
DatabaseType.getCurrentDateTimeFunction() instead. |
String |
getDatabaseChangeLogLockTableName()
Deprecated.
Use
DatabaseType.getDatabaseChangeLogLockTableName() instead. |
String |
getDatabaseChangeLogObjectsTablespace()
Deprecated.
Use
DatabaseType.getLiquibaseTablespaceName() instead. |
String |
getDatabaseChangeLogTableName()
Deprecated.
Use
DatabaseType.getDatabaseChangeLogTableName() instead. |
String |
getDatabaseClass()
Deprecated.
Use
DatabaseType.getDatabaseClass() instead. |
String |
getDefaultCatalogName()
Deprecated.
Use
DatabaseType.getDefaultCatalogName() instead. |
protected String |
getDefaultOutputEncoding() |
String |
getDefaultSchemaName()
Deprecated.
Use
DatabaseType.getDefaultSchemaName() instead. |
String |
getDriver()
Deprecated.
Use
DatabaseType.getDriver() instead. |
protected Liquibase |
getLiquibase() |
FileResource |
getOutputFile()
This method does nothing.
|
String |
getPassword()
Deprecated.
Use
DatabaseType.getPassword() instead. |
String |
getUrl()
Deprecated.
Use
DatabaseType.getUrl() instead. |
String |
getUsername()
Deprecated.
Use
DatabaseType.getUser() instead. |
void |
init() |
boolean |
isOutputDefaultCatalog()
Deprecated.
Use
DatabaseType.isOutputDefaultCatalog() instead. |
boolean |
isOutputDefaultSchema()
Deprecated.
Use
DatabaseType.isOutputDefaultSchema() instead. |
boolean |
isPromptOnNonLocalDatabase() |
void |
setChangeLogFile(String changeLogFile) |
void |
setChangeLogParametersRef(Reference changeLogParametersRef) |
void |
setClasspathRef(Reference r) |
void |
setContexts(String cntx)
This method no longer does anything.
|
void |
setCurrentDateTimeFunction(String currentDateTimeFunction)
Deprecated.
Use
DatabaseType.setCurrentDateTimeFunction(String) instead. |
void |
setDatabaseChangeLogLockTableName(String tableName)
Deprecated.
|
void |
setDatabaseChangeLogObjectsTablespace(String tablespaceName)
Deprecated.
Use
DatabaseType.setLiquibaseTablespaceName(String) instead. |
void |
setDatabaseChangeLogTableName(String tableName)
Deprecated.
Use
DatabaseType.setDatabaseChangeLogTableName(String) instead. |
void |
setDatabaseClass(String databaseClass)
Deprecated.
Use
DatabaseType.setDatabaseClass(String) instead. |
void |
setDatabaseRef(Reference databaseRef) |
void |
setDefaultCatalogName(String defaultCatalogName)
Deprecated.
Use
DatabaseType.setDefaultCatalogName(String) instead. |
void |
setDefaultSchemaName(String defaultSchemaName)
Deprecated.
Use
DatabaseType.setDefaultSchemaName(String) instead. |
void |
setDriver(String driver)
Deprecated.
Use
DatabaseType.setDriver(String) instead. |
void |
setOutputDefaultCatalog(boolean outputDefaultCatalog)
Deprecated.
Use
DatabaseType.setOutputDefaultCatalog(boolean) instead. |
void |
setOutputDefaultSchema(boolean outputDefaultSchema)
Deprecated.
Use a nested
DatabaseType instead. |
void |
setOutputEncoding(String outputEncoding) |
void |
setOutputFile(FileResource outputFile)
This method does nothing.
|
void |
setPassword(String password)
Deprecated.
Use
DatabaseType.setPassword(String) instead. |
void |
setPromptOnNonLocalDatabase(boolean promptOnNonLocalDatabase)
Deprecated parameters *
|
void |
setUrl(String url)
Deprecated.
Use
DatabaseType.setUrl(String) instead. |
void |
setUsername(String username)
Deprecated.
Use
DatabaseType.setUser(String) instead. |
protected boolean |
shouldRun() |
protected void |
validateParameters()
Subclasses that override this method must always call
super.validateParameters() method. |
public void init() throws BuildException
BuildException
public final void execute() throws BuildException
BuildException
protected abstract void executeWithLiquibaseClassloader() throws BuildException
BuildException
protected Database createDatabaseFromConfiguredDatabaseType()
protected Database createDatabaseFromType(DatabaseType databaseType)
protected Liquibase getLiquibase()
public String getChangeLogDirectory()
AbstractChangeLogBasedTask.getChangeLogDirectory()
protected String getChangeLogFile()
AbstractChangeLogBasedTask.getChangeLogFile()
public void setChangeLogFile(String changeLogFile)
protected boolean shouldRun()
protected String getDefaultOutputEncoding()
protected void validateParameters()
super.validateParameters()
method.protected void closeDatabase(Database database)
database
- The database to close.public Path createClasspath()
public void setClasspathRef(Reference r)
public void addDatabase(DatabaseType databaseType)
public void setDatabaseRef(Reference databaseRef)
public void addChangeLogParameters(ChangeLogParametersType changeLogParameters)
public void setChangeLogParametersRef(Reference changeLogParametersRef)
public boolean isPromptOnNonLocalDatabase()
public void setPromptOnNonLocalDatabase(boolean promptOnNonLocalDatabase)
@Deprecated public String getDriver()
DatabaseType.getDriver()
instead.@Deprecated public void setDriver(String driver)
DatabaseType.setDriver(String)
instead.@Deprecated public String getUrl()
DatabaseType.getUrl()
instead.@Deprecated public void setUrl(String url)
DatabaseType.setUrl(String)
instead.@Deprecated public String getUsername()
DatabaseType.getUser()
instead.@Deprecated public void setUsername(String username)
DatabaseType.setUser(String)
instead.@Deprecated public String getPassword()
DatabaseType.getPassword()
instead.@Deprecated public void setPassword(String password)
DatabaseType.setPassword(String)
instead.@Deprecated public String getCurrentDateTimeFunction()
DatabaseType.getCurrentDateTimeFunction()
instead.@Deprecated public void setCurrentDateTimeFunction(String currentDateTimeFunction)
DatabaseType.setCurrentDateTimeFunction(String)
instead.public FileResource getOutputFile()
public void setOutputFile(FileResource outputFile)
@Deprecated public Writer createOutputWriter() throws IOException
AbstractChangeLogBasedTask
if their task involves a change log.IOException
@Deprecated public PrintStream createPrintStream() throws IOException
AbstractChangeLogBasedTask
if the task involves a change log.IOException
public void setOutputEncoding(String outputEncoding)
@Deprecated public String getDefaultCatalogName()
DatabaseType.getDefaultCatalogName()
instead.@Deprecated public void setDefaultCatalogName(String defaultCatalogName)
DatabaseType.setDefaultCatalogName(String)
instead.@Deprecated public String getDefaultSchemaName()
DatabaseType.getDefaultSchemaName()
instead.@Deprecated public void setDefaultSchemaName(String defaultSchemaName)
DatabaseType.setDefaultSchemaName(String)
instead.@Deprecated public void addConfiguredChangeLogProperty(BaseLiquibaseTask.ChangeLogProperty changeLogProperty)
ChangeLogParametersType.addConfiguredChangeLogParameter(Property)
instead.@Deprecated protected Liquibase createLiquibase() throws Exception
getLiquibase()
instead.Exception
@Deprecated protected Database createDatabaseObject(String driverClassName, String databaseUrl, String username, String password, String defaultCatalogName, String defaultSchemaName, String databaseClass) throws Exception
createDatabaseFromType(DatabaseType)
instead.Exception
public String getContexts()
AbstractChangeLogBasedTask
which has the equivalent method.public void setContexts(String cntx)
AbstractChangeLogBasedTask
which has the equivalent method.@Deprecated protected void closeDatabase(Liquibase liquibase)
closeDatabase(liquibase.database.Database)
instead.@Deprecated public String getDatabaseClass()
DatabaseType.getDatabaseClass()
instead.@Deprecated public void setDatabaseClass(String databaseClass)
DatabaseType.setDatabaseClass(String)
instead.@Deprecated public String getDatabaseChangeLogTableName()
DatabaseType.getDatabaseChangeLogTableName()
instead.@Deprecated public void setDatabaseChangeLogTableName(String tableName)
DatabaseType.setDatabaseChangeLogTableName(String)
instead.@Deprecated public String getDatabaseChangeLogLockTableName()
DatabaseType.getDatabaseChangeLogLockTableName()
instead.@Deprecated public void setDatabaseChangeLogLockTableName(String tableName)
@Deprecated public String getDatabaseChangeLogObjectsTablespace()
DatabaseType.getLiquibaseTablespaceName()
instead.@Deprecated public void setDatabaseChangeLogObjectsTablespace(String tablespaceName)
DatabaseType.setLiquibaseTablespaceName(String)
instead.@Deprecated public boolean isOutputDefaultSchema()
DatabaseType.isOutputDefaultSchema()
instead.@Deprecated public void setOutputDefaultSchema(boolean outputDefaultSchema)
DatabaseType
instead.outputDefaultSchema
- True to output the default schema.@Deprecated public boolean isOutputDefaultCatalog()
DatabaseType.isOutputDefaultCatalog()
instead.@Deprecated public void setOutputDefaultCatalog(boolean outputDefaultCatalog)
DatabaseType.setOutputDefaultCatalog(boolean)
instead.outputDefaultCatalog
- True to output the default catalog.Copyright © 2019 Liquibase.org. All rights reserved.