Package liquibase.command
Class CommandFactory
java.lang.Object
liquibase.command.CommandFactory
- All Implemented Interfaces:
SingletonObject
Manages the command related implementations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends CommandResult>
Texecute
(LiquibaseCommand<T> command) Deprecated.getCommand
(String commandName) Deprecated.getCommandDefinition
(String... commandName) Returns the completeCommandDefinition
for the given commandName.getCommands
(boolean includeInternal) Returns all knownCommandDefinition
s.static CommandFactory
protected void
register
(String[] commandName, CommandArgumentDefinition<?> definition) Called byCommandArgumentDefinition.Building.build()
to register that a particularCommandArgumentDefinition
is available for a command.void
Reset the COMMAND_DEFINITIONS cache.protected void
unregister
(String[] commandName) Unregisters all information about the givenCommandStep
.
-
Constructor Details
-
CommandFactory
protected CommandFactory()
-
-
Method Details
-
getInstance
-
getCommandDefinition
public CommandDefinition getCommandDefinition(String... commandName) throws IllegalArgumentException Returns the completeCommandDefinition
for the given commandName.- Throws:
IllegalArgumentException
- if the commandName is not known
-
getCommands
Returns all knownCommandDefinition
s.- Parameters:
includeInternal
- if true, also include commands marked asCommandDefinition.getInternal()
-
register
Called byCommandArgumentDefinition.Building.build()
to register that a particularCommandArgumentDefinition
is available for a command. -
unregister
Unregisters all information about the givenCommandStep
. <bNOTE: package-protected method used primarily for testing and may be removed or modified in the future. -
getCommand
Deprecated. -
execute
public <T extends CommandResult> T execute(LiquibaseCommand<T> command) throws CommandExecutionException Deprecated.- Throws:
CommandExecutionException
-
resetCommandDefinitions
public void resetCommandDefinitions()Reset the COMMAND_DEFINITIONS cache. Added for tests.
-
CommandScope.execute()