public interface CommandStep
defineCommandNames()
matches the command,
add the dependencies and run the pipeline.CommandScope.execute()
Modifier and Type | Field and Description |
---|---|
static int |
ORDER_DEFAULT
Deprecated.
|
static int |
ORDER_NOT_APPLICABLE
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
adjustCommandDefinition(CommandDefinition commandDefinition)
Called by the command pipeline setup to adjust the
CommandDefinition metadata about the overall command. |
String[][] |
defineCommandNames()
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.
|
List<Class<?>> |
providedDependencies()
Returns a list of all the dependency Classes that this step provides
|
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.
|
void |
validate(CommandScope commandScope)
Validates that the
CommandScope is correctly set up for this step to run. |
@Deprecated static final int ORDER_DEFAULT
getOrder(CommandDefinition)
if you are unsure where in the pipeline your step should go, use this value.@Deprecated static final int ORDER_NOT_APPLICABLE
getOrder(CommandDefinition)
if this step should not be a part of the pipeline.String[][] defineCommandNames()
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
@Deprecated int getOrder(CommandDefinition commandDefinition)
CommandDefinition.getName()
but it can check other things in the definition such as arguments.void adjustCommandDefinition(CommandDefinition commandDefinition)
CommandDefinition
metadata about the overall command.
This method should not be called directly. It is called by the overall pipeline logic in the CommandFactory.getCommandDefinition(String...)
.void validate(CommandScope commandScope) throws CommandValidationException
CommandScope
is correctly set up for this step to run.
Any validation in CommandArgumentDefinition.validate(CommandScope)
will be checked previous to this method being called.CommandValidationException
void run(CommandResultsBuilder resultsBuilder) throws Exception
CommandScope.execute()
order.Exception
List<Class<?>> requiredDependencies()
Copyright © 2023 Liquibase.org. All rights reserved.