public abstract class AbstractCliWrapperCommandStep extends AbstractCommandStep
CommandStep
s that simply wrap calls to Main
ORDER_DEFAULT, ORDER_NOT_APPLICABLE
Constructor and Description |
---|
AbstractCliWrapperCommandStep()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected abstract String[] |
collectArguments(CommandScope commandScope)
Deprecated.
Called by
run(CommandResultsBuilder) to create the actual arguments passed to Main.run(String[]) . |
protected String[] |
collectArguments(CommandScope commandScope,
List<String> commandArguments,
String positionalArgumentName)
Deprecated.
Collects the values from commandScope into an argument array to pass to
Main . |
protected void |
preRunCheck(CommandResultsBuilder resultsBuilder)
Deprecated.
|
protected String[] |
removeArgumentValues(String[] allArguments,
String... argumentsThatTakeNoValue)
Deprecated.
|
void |
run(CommandResultsBuilder resultsBuilder)
Deprecated.
Performs the business logic.
|
adjustCommandDefinition, getOrder, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
defineCommandNames
public final void run(CommandResultsBuilder resultsBuilder) throws Exception
CommandStep
CommandStep.getOrder(CommandDefinition)
order.Exception
protected void preRunCheck(CommandResultsBuilder resultsBuilder)
protected abstract String[] collectArguments(CommandScope commandScope) throws CommandExecutionException
run(CommandResultsBuilder)
to create the actual arguments passed to Main.run(String[])
.
Implementations should generally call collectArguments(CommandScope, List, String)
and possibly removeArgumentValues(String[], String...)
CommandExecutionException
protected String[] collectArguments(CommandScope commandScope, List<String> commandArguments, String positionalArgumentName) throws CommandExecutionException
Main
.
All arguments will values in commandScope will be passed as global arguments EXCEPT for ones listed in the commandArguments.
If main takes a "positional argument" like `liquibase tag tagName`, specify the commandScope argument that should be converted to a positional argument in "positionalArgumentName".Copyright © 2022 Liquibase.org. All rights reserved.