Package liquibase.command
Class CommandFactory
java.lang.Object
liquibase.command.CommandFactory
- All Implemented Interfaces:
SingletonObject
Manages the command related implementations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends CommandResult>
Texecute(LiquibaseCommand<T> command) Deprecated.getCommand(String commandName) Deprecated.getCommandDefinition(String... commandName) Returns the completeCommandDefinitionfor the given commandName.getCommands(boolean includeInternal) Returns all knownCommandDefinitions.static CommandFactoryprotected voidregister(String[] commandName, CommandArgumentDefinition<?> definition) Called byCommandArgumentDefinition.Building.build()to register that a particularCommandArgumentDefinitionis available for a command.voidReset the COMMAND_DEFINITIONS cache.protected voidunregister(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 completeCommandDefinitionfor the given commandName.- Throws:
IllegalArgumentException- if the commandName is not known
-
getCommands
Returns all knownCommandDefinitions.- Parameters:
includeInternal- if true, also include commands marked asCommandDefinition.getInternal()
-
register
Called byCommandArgumentDefinition.Building.build()to register that a particularCommandArgumentDefinitionis 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()