public abstract class AbstractUpdateCommandStep extends AbstractCommandStep implements CleanUpCommandStep
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CHANGE_EXEC_LISTENER_RESULT_KEY |
coreBundle
ORDER_DEFAULT, ORDER_NOT_APPLICABLE
Constructor and Description |
---|
AbstractUpdateCommandStep() |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp(CommandResultsBuilder resultsBuilder)
Method invoked to execute the cleanup action.
|
protected void |
customMdcLogging(CommandScope commandScope) |
abstract String |
getChangelogFileArg(CommandScope commandScope) |
abstract String[] |
getCommandName() |
abstract String |
getContextsArg(CommandScope commandScope) |
protected abstract String |
getHubOperation() |
abstract String |
getLabelFilterArg(CommandScope commandScope) |
abstract UpdateSummaryEnum |
getShowSummary(CommandScope commandScope) |
ChangeLogIterator |
getStandardChangelogIterator(CommandScope commandScope,
Database database,
Contexts contexts,
LabelExpression labelExpression,
DatabaseChangeLog changeLog) |
ChangeLogIterator |
getStatusChangelogIterator(CommandScope commandScope,
Database database,
Contexts contexts,
LabelExpression labelExpression,
DatabaseChangeLog changeLog) |
boolean |
isUpToDate(CommandScope commandScope,
Database database,
DatabaseChangeLog databaseChangeLog,
Contexts contexts,
LabelExpression labelExpression,
OutputStream outputStream)
Checks if the database is up-to-date.
|
void |
postUpdateLog()
Log
|
List<Class<?>> |
requiredDependencies()
Return a list of configured Classes that this command requires to be passed as a dependency.
|
void |
run(CommandResultsBuilder resultsBuilder)
Performs the business logic.
|
adjustCommandDefinition, getOrder, providedDependencies, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
defineCommandNames
public static final String DEFAULT_CHANGE_EXEC_LISTENER_RESULT_KEY
public abstract String getChangelogFileArg(CommandScope commandScope)
public abstract String getContextsArg(CommandScope commandScope)
public abstract String getLabelFilterArg(CommandScope commandScope)
public abstract String[] getCommandName()
public abstract UpdateSummaryEnum getShowSummary(CommandScope commandScope)
protected abstract String getHubOperation()
public List<Class<?>> requiredDependencies()
CommandStep
requiredDependencies
in interface CommandStep
requiredDependencies
in class AbstractCommandStep
public void run(CommandResultsBuilder resultsBuilder) throws Exception
CommandStep
CommandScope.execute()
order.run
in interface CommandStep
Exception
protected void customMdcLogging(CommandScope commandScope)
public void cleanUp(CommandResultsBuilder resultsBuilder)
CleanUpCommandStep
cleanUp
in interface CleanUpCommandStep
resultsBuilder
- builder used in this pipeline@Beta public ChangeLogIterator getStandardChangelogIterator(CommandScope commandScope, Database database, Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog changeLog) throws DatabaseException
DatabaseException
@Beta public ChangeLogIterator getStatusChangelogIterator(CommandScope commandScope, Database database, Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog changeLog) throws DatabaseException
DatabaseException
@Beta public boolean isUpToDate(CommandScope commandScope, Database database, DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labelExpression, OutputStream outputStream) throws LiquibaseException, IOException
commandScope
- database
- the database to checkdatabaseChangeLog
- the databaseChangeLog of the databasecontexts
- the command contextslabelExpression
- the command label expressionsoutputStream
- the current global OutputStreamLiquibaseException
- if there was a problem running any queriesIOException
- if there was a problem handling the update summary@Beta public void postUpdateLog()
Copyright © 2023 Liquibase.org. All rights reserved.