Package liquibase.command
Interface CommandStep
- All Known Implementing Classes:
AbstractArgumentCommandStep
,AbstractChangelogCommandStep
,AbstractCliWrapperCommandStep
,AbstractCommandStep
,AbstractDatabaseConnectionCommandStep
,AbstractFutureRollbackCommandStep
,AbstractHelperCommandStep
,AbstractOutputWriterCommandStep
,AbstractRollbackCommandStep
,AbstractUpdateCommandStep
,CalculateChecksumCommandStep
,ChangeExecListenerCommandStep
,ChangelogSyncCommandStep
,ChangelogSyncSqlCommandStep
,ChangelogSyncToTagCommandStep
,ChangelogSyncToTagSqlCommandStep
,ClearChecksumsCommandStep
,DatabaseChangelogCommandStep
,DbDocCommandStep
,DbUrlConnectionArgumentsCommandStep
,DbUrlConnectionCommandStep
,DiffChangelogCommandStep
,DiffCommandStep
,DiffOutputControlCommandStep
,DropAllCommandStep
,ExecuteSqlCommandStep
,FutureRollbackCountSqlCommandStep
,FutureRollbackFromTagSqlCommandStep
,FutureRollbackSqlCommandStep
,GenerateChangelogCommandStep
,HistoryCommandStep
,InternalSnapshotCommandStep
,ListLocksCommandStep
,LockServiceCommandStep
,MarkNextChangesetRanCommandStep
,MarkNextChangesetRanSqlCommandStep
,OutputWriterCommandStep
,PreCompareCommandStep
,ReferenceDatabaseOutputWriterCommandStep
,ReferenceDbUrlConnectionCommandStep
,ReleaseLocksCommandStep
,RollbackCommandStep
,RollbackCountCommandStep
,RollbackCountSqlCommandStep
,RollbackSqlCommandStep
,RollbackToDateCommandStep
,RollbackToDateSqlCommandStep
,ShowSummaryArgument
,SnapshotCommandStep
,SnapshotReferenceCommandStep
,StartH2CommandStep
,StatusCommandStep
,StopH2CommandStep
,TagCommandStep
,TagExistsCommandStep
,TestSystemDownCommand
,TestSystemUpCommand
,UnexpectedChangesetsCommandStep
,UpdateCommandStep
,UpdateCountCommandStep
,UpdateCountSqlCommandStep
,UpdateSqlCommandStep
,UpdateTestingRollbackCommandStep
,UpdateToTagCommandStep
,UpdateToTagSqlCommandStep
,ValidateCommandStep
public interface CommandStep
Defines a particular step in a command pipeline.
When a command is executed, Liquibase will find all the step whose
defineCommandNames()
matches the command,
add the dependencies and run the pipeline.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Deprecated.static final int
Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustCommandDefinition
(CommandDefinition commandDefinition) Called by the command pipeline setup to adjust theCommandDefinition
metadata about the overall command.String[][]
Defines new command names For example, if it is part of `liquibase update`, this should return new String[][]{ new String[] {"update"}}.int
getOrder
(CommandDefinition commandDefinition) Deprecated.Returns a list of all the dependency Classes that this step providesReturn a list of configured Classes that this command requires to be passed as a dependency.void
run
(CommandResultsBuilder resultsBuilder) Performs the business logic.void
validate
(CommandScope commandScope) Validates that theCommandScope
is correctly set up for this step to run.
-
Field Details
-
ORDER_DEFAULT
Deprecated.Returned bygetOrder(CommandDefinition)
if you are unsure where in the pipeline your step should go, use this value.- See Also:
-
ORDER_NOT_APPLICABLE
Deprecated.Returned bygetOrder(CommandDefinition)
if this step should not be a part of the pipeline.- See Also:
-
-
Method Details
-
defineCommandNames
String[][] defineCommandNames()Defines 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
-
getOrder
Deprecated.The order in the pipeline that this step should be executed in. Logic is generally based offCommandDefinition.getName()
but it can check other things in the definition such as arguments.- Returns:
- -1 if this step does not apply to the given command
-
adjustCommandDefinition
Called by the command pipeline setup to adjust theCommandDefinition
metadata about the overall command. This method should not be called directly. It is called by the overall pipeline logic in theCommandFactory.getCommandDefinition(String...)
. -
validate
Validates that theCommandScope
is correctly set up for this step to run. Any validation inCommandArgumentDefinition.validate(CommandScope)
will be checked previous to this method being called.- Throws:
CommandValidationException
-
run
Performs the business logic. This method should not be called directly. It is called by the overall pipeline logic in theCommandScope.execute()
order.- Throws:
Exception
-
requiredDependencies
Return a list of configured Classes that this command requires to be passed as a dependency.- Returns:
- list with the required classes types
-
providedDependencies
Returns a list of all the dependency Classes that this step provides- Returns:
- list with the provided classes types
-