Package org.seedstack.seed.command
Interface CommandRegistry
-
public interface CommandRegistryThe command registry holds all command definitions and can be used to retrieve additional information on them.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandcreateCommand(String scope, String name, List<String> argValues, Map<String,String> optionValues)Instantiates aCommandobject given a scope, a name and a list of arguments and options.List<Argument>getArgumentsInfo(String scope, String name)Retrieves the argument list of a command.CommandDefinitiongetCommandInfo(String scope, String name)Retrieves the command definition.Set<String>getCommandList()Retrieves list of all registered commands.List<Option>getOptionsInfo(String scope, String name)Retrieves the options list of a command.
-
-
-
Method Detail
-
getCommandList
Set<String> getCommandList()
Retrieves list of all registered commands.- Returns:
- the list of fully qualified (scope:name) commands.
-
getOptionsInfo
List<Option> getOptionsInfo(String scope, String name)
Retrieves the options list of a command.- Parameters:
scope- the command scope.name- the command name.- Returns:
- the list of
Option.
-
getArgumentsInfo
List<Argument> getArgumentsInfo(String scope, String name)
Retrieves the argument list of a command.- Parameters:
scope- the command scope.name- the command name.- Returns:
- the list of
Argument.
-
getCommandInfo
CommandDefinition getCommandInfo(String scope, String name)
Retrieves the command definition.- Parameters:
scope- the command scope.name- the command name.- Returns:
- the
CommandDefinitionobject.
-
createCommand
Command createCommand(String scope, String name, List<String> argValues, Map<String,String> optionValues)
Instantiates aCommandobject given a scope, a name and a list of arguments and options.- Parameters:
scope- the command scope.name- the command name.argValues- the argument values.optionValues- the option values.- Returns:
- the
Commandobject, already initialized and injected with corresponding values.
-
-