Package liquibase.command.core
Class UpdateToTagCommandStep
- java.lang.Object
-
- liquibase.command.AbstractCommandStep
-
- liquibase.command.core.AbstractUpdateCommandStep
-
- liquibase.command.core.UpdateToTagCommandStep
-
- All Implemented Interfaces:
CleanUpCommandStep,CommandStep
- Direct Known Subclasses:
UpdateToTagSqlCommandStep
public class UpdateToTagCommandStep extends AbstractUpdateCommandStep
-
-
Field Summary
Fields Modifier and Type Field Description static CommandArgumentDefinition<String>CHANGELOG_FILE_ARGstatic CommandArgumentDefinition<ChangeLogParameters>CHANGELOG_PARAMETERSstatic String[]COMMAND_NAMEstatic CommandArgumentDefinition<String>CONTEXTS_ARGstatic CommandArgumentDefinition<String>LABEL_FILTER_ARGstatic CommandArgumentDefinition<String>TAG_ARG-
Fields inherited from class liquibase.command.core.AbstractUpdateCommandStep
DEFAULT_CHANGE_EXEC_LISTENER_RESULT_KEY
-
Fields inherited from class liquibase.command.AbstractCommandStep
coreBundle
-
Fields inherited from interface liquibase.command.CommandStep
ORDER_DEFAULT, ORDER_NOT_APPLICABLE
-
-
Constructor Summary
Constructors Constructor Description UpdateToTagCommandStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadjustCommandDefinition(CommandDefinition commandDefinition)Default implementation makes no changesprotected voidcustomMdcLogging(CommandScope commandScope)String[][]defineCommandNames()Defines new command names For example, if it is part of `liquibase update`, this should return new String[][]{ new String[] {"update"}}.StringgetChangelogFileArg(CommandScope commandScope)String[]getCommandName()StringgetContextsArg(CommandScope commandScope)StringgetLabelFilterArg(CommandScope commandScope)UpdateSummaryEnumgetShowSummary(CommandScope commandScope)ChangeLogIteratorgetStandardChangelogIterator(CommandScope commandScope, Database database, Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog changeLog)ChangeLogIteratorgetStatusChangelogIterator(CommandScope commandScope, Database database, Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog changeLog)voidpostUpdateLog(int rowsAffected)LogList<Class<?>>requiredDependencies()Return a list of configured Classes that this command requires to be passed as a dependency.voidrun(CommandResultsBuilder resultsBuilder)Performs the business logic.-
Methods inherited from class liquibase.command.core.AbstractUpdateCommandStep
cleanUp, getShowSummaryOutput, getStandardChangelogIteratorFilters, isUpToDate, isUpToDateFastCheck, preRun, setDBLock, setFastCheckEnabled
-
Methods inherited from class liquibase.command.AbstractCommandStep
getOrder, providedDependencies, validate
-
-
-
-
Field Detail
-
COMMAND_NAME
public static final String[] COMMAND_NAME
-
CHANGELOG_FILE_ARG
public static final CommandArgumentDefinition<String> CHANGELOG_FILE_ARG
-
LABEL_FILTER_ARG
public static final CommandArgumentDefinition<String> LABEL_FILTER_ARG
-
CONTEXTS_ARG
public static final CommandArgumentDefinition<String> CONTEXTS_ARG
-
TAG_ARG
public static final CommandArgumentDefinition<String> TAG_ARG
-
CHANGELOG_PARAMETERS
public static final CommandArgumentDefinition<ChangeLogParameters> CHANGELOG_PARAMETERS
-
-
Method Detail
-
run
public void run(CommandResultsBuilder resultsBuilder) throws Exception
Description copied from interface:CommandStepPerforms the business logic. This method should not be called directly. It is called by the overall pipeline logic in theCommandScope.execute()order.- Specified by:
runin interfaceCommandStep- Overrides:
runin classAbstractUpdateCommandStep- Throws:
Exception
-
defineCommandNames
public String[][] defineCommandNames()
Description copied from interface:CommandStepDefines new command names For example, if it is part of `liquibase update`, this should return new String[][]{ new String[] {"update"}}. If it is a part of `liquibase example init`, this should return {"example", "init"}.This is used to determine the available command names.
This can return null if this step is not defining a new command but "cross-cutting" existing commands
-
adjustCommandDefinition
public void adjustCommandDefinition(CommandDefinition commandDefinition)
Description copied from class:AbstractCommandStepDefault implementation makes no changes- Specified by:
adjustCommandDefinitionin interfaceCommandStep- Overrides:
adjustCommandDefinitionin classAbstractCommandStep
-
getChangelogFileArg
public String getChangelogFileArg(CommandScope commandScope)
- Specified by:
getChangelogFileArgin classAbstractUpdateCommandStep
-
getContextsArg
public String getContextsArg(CommandScope commandScope)
- Specified by:
getContextsArgin classAbstractUpdateCommandStep
-
getLabelFilterArg
public String getLabelFilterArg(CommandScope commandScope)
- Specified by:
getLabelFilterArgin classAbstractUpdateCommandStep
-
getCommandName
public String[] getCommandName()
- Specified by:
getCommandNamein classAbstractUpdateCommandStep
-
getShowSummary
public UpdateSummaryEnum getShowSummary(CommandScope commandScope)
- Specified by:
getShowSummaryin classAbstractUpdateCommandStep
-
getStandardChangelogIterator
public ChangeLogIterator getStandardChangelogIterator(CommandScope commandScope, Database database, Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog changeLog) throws DatabaseException
- Overrides:
getStandardChangelogIteratorin classAbstractUpdateCommandStep- Throws:
DatabaseException
-
getStatusChangelogIterator
public ChangeLogIterator getStatusChangelogIterator(CommandScope commandScope, Database database, Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog changeLog) throws DatabaseException
- Overrides:
getStatusChangelogIteratorin classAbstractUpdateCommandStep- Throws:
DatabaseException
-
requiredDependencies
public List<Class<?>> requiredDependencies()
Description copied from interface:CommandStepReturn a list of configured Classes that this command requires to be passed as a dependency.- Specified by:
requiredDependenciesin interfaceCommandStep- Overrides:
requiredDependenciesin classAbstractUpdateCommandStep- Returns:
- list with the required classes types
-
customMdcLogging
protected void customMdcLogging(CommandScope commandScope)
- Overrides:
customMdcLoggingin classAbstractUpdateCommandStep
-
postUpdateLog
public void postUpdateLog(int rowsAffected)
Description copied from class:AbstractUpdateCommandStepLog- Overrides:
postUpdateLogin classAbstractUpdateCommandStep
-
-