public class CommandFactory extends Object implements SingletonObject
Modifier | Constructor and Description |
---|---|
protected |
CommandFactory() |
Modifier and Type | Method and Description |
---|---|
<T extends CommandResult> |
execute(LiquibaseCommand<T> command)
Deprecated.
|
LiquibaseCommand |
getCommand(String commandName)
Deprecated.
|
CommandDefinition |
getCommandDefinition(String... commandName)
Returns the complete
CommandDefinition for the given commandName. |
SortedSet<CommandDefinition> |
getCommands(boolean includeInternal)
Returns all known
CommandDefinition s. |
static CommandFactory |
getInstance() |
protected void |
register(String[] commandName,
CommandArgumentDefinition<?> definition)
Called by
CommandArgumentDefinition.Building.build() to
register that a particular CommandArgumentDefinition is available for a command. |
protected void |
unregister(String[] commandName)
Unregisters all information about the given
CommandStep . |
public static CommandFactory getInstance()
public CommandDefinition getCommandDefinition(String... commandName) throws IllegalArgumentException
CommandDefinition
for the given commandName.IllegalArgumentException
- if the commandName is not knownpublic SortedSet<CommandDefinition> getCommands(boolean includeInternal)
CommandDefinition
s.includeInternal
- if true, also include commands marked as CommandDefinition.getInternal()
protected void register(String[] commandName, CommandArgumentDefinition<?> definition)
CommandArgumentDefinition.Building.build()
to
register that a particular CommandArgumentDefinition
is available for a command.protected void unregister(String[] commandName)
CommandStep
.
public LiquibaseCommand getCommand(String commandName)
getCommandDefinition(String...)
public <T extends CommandResult> T execute(LiquibaseCommand<T> command) throws CommandExecutionException
CommandScope.execute()
CommandExecutionException
Copyright © 2023 Liquibase.org. All rights reserved.