Package org.jboss.as.cli.impl.aesh
Class CLICommandRegistry
- java.lang.Object
-
- org.jboss.as.cli.CommandRegistry
-
- org.jboss.as.cli.impl.aesh.CLICommandRegistry
-
- All Implemented Interfaces:
org.aesh.command.registry.CommandRegistry
public class CLICommandRegistry extends CommandRegistry implements org.aesh.command.registry.CommandRegistry
Command registry that deals with both CLI Handler and aesh Command.- Author:
- jdenise@redhat.com
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.as.cli.CommandRegistry
CommandRegistry.RegisterHandlerException
-
-
Constructor Summary
Constructors Constructor Description CLICommandRegistry(CommandContextImpl ctx, OperationCommandContainer op)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.aesh.command.container.CommandContaineraddCommand(org.aesh.command.Command<?> command)org.aesh.command.container.CommandContaineraddCommand(org.aesh.command.Command<? extends org.aesh.command.invocation.CommandInvocation> command, Map<String,String> renaming, boolean thirdparty)org.aesh.command.container.CommandContaineraddCommand(org.aesh.command.container.CommandContainer container)voidaddRegistrationListener(org.aesh.command.registry.CommandRegistry.CommandRegistrationListener listener)org.aesh.command.container.CommandContaineraddThirdPartyCommand(org.aesh.command.Command<?> command, Map<String,String> renaming)voidcompleteCommandName(org.aesh.readline.completion.CompleteOperation completeOperation, org.aesh.parser.ParsedLine parsedLine)org.aesh.command.impl.parser.CommandLineParserfindCommand(String name, String line)Set<String>getAllCommandNames()List<String>getAvailableAeshCommands()List<org.aesh.command.impl.parser.CommandLineParser<?>>getChildCommandParsers(String parent)org.aesh.command.container.CommandContainer<CLICommandInvocation>getCommand(String name, String line)org.aesh.command.container.CommandContainergetCommandByAlias(String alias)StringgetCommandName(org.aesh.command.Command<CLICommandInvocation> command)booleanisLegacyCommand(String name)voidregisterHandler(CommandHandler handler, boolean tabComplete, String... names)CommandHandlerremove(String cmdName)voidremoveCommand(String name)voidremoveRegistrationListener(org.aesh.command.registry.CommandRegistry.CommandRegistrationListener listener)-
Methods inherited from class org.jboss.as.cli.CommandRegistry
getCommandHandler, getTabCompletionCommands, registerHandler
-
-
-
-
Constructor Detail
-
CLICommandRegistry
public CLICommandRegistry(CommandContextImpl ctx, OperationCommandContainer op)
-
-
Method Detail
-
remove
public CommandHandler remove(String cmdName)
- Overrides:
removein classCommandRegistry
-
registerHandler
public void registerHandler(CommandHandler handler, boolean tabComplete, String... names) throws CommandRegistry.RegisterHandlerException
- Overrides:
registerHandlerin classCommandRegistry- Throws:
CommandRegistry.RegisterHandlerException
-
addCommand
public org.aesh.command.container.CommandContainer addCommand(org.aesh.command.Command<?> command) throws CommandLineException, org.aesh.command.parser.CommandLineParserException- Throws:
CommandLineExceptionorg.aesh.command.parser.CommandLineParserException
-
addThirdPartyCommand
public org.aesh.command.container.CommandContainer addThirdPartyCommand(org.aesh.command.Command<?> command, Map<String,String> renaming) throws org.aesh.command.parser.CommandLineParserException, CommandLineException- Throws:
org.aesh.command.parser.CommandLineParserExceptionCommandLineException
-
addCommand
public org.aesh.command.container.CommandContainer addCommand(org.aesh.command.Command<? extends org.aesh.command.invocation.CommandInvocation> command, Map<String,String> renaming, boolean thirdparty) throws CommandLineException, org.aesh.command.parser.CommandLineParserException- Throws:
CommandLineExceptionorg.aesh.command.parser.CommandLineParserException
-
addCommand
public org.aesh.command.container.CommandContainer addCommand(org.aesh.command.container.CommandContainer container) throws CommandLineException- Throws:
CommandLineException
-
getCommand
public org.aesh.command.container.CommandContainer<CLICommandInvocation> getCommand(String name, String line) throws org.aesh.command.CommandNotFoundException
- Specified by:
getCommandin interfaceorg.aesh.command.registry.CommandRegistry- Throws:
org.aesh.command.CommandNotFoundException
-
completeCommandName
public void completeCommandName(org.aesh.readline.completion.CompleteOperation completeOperation, org.aesh.parser.ParsedLine parsedLine)- Specified by:
completeCommandNamein interfaceorg.aesh.command.registry.CommandRegistry
-
getAllCommandNames
public Set<String> getAllCommandNames()
- Specified by:
getAllCommandNamesin interfaceorg.aesh.command.registry.CommandRegistry
-
removeCommand
public void removeCommand(String name)
-
findCommand
public org.aesh.command.impl.parser.CommandLineParser findCommand(String name, String line) throws org.aesh.command.CommandNotFoundException
- Throws:
org.aesh.command.CommandNotFoundException
-
getCommandByAlias
public org.aesh.command.container.CommandContainer getCommandByAlias(String alias) throws org.aesh.command.CommandNotFoundException
- Specified by:
getCommandByAliasin interfaceorg.aesh.command.registry.CommandRegistry- Throws:
org.aesh.command.CommandNotFoundException
-
getChildCommandParsers
public List<org.aesh.command.impl.parser.CommandLineParser<?>> getChildCommandParsers(String parent) throws org.aesh.command.CommandNotFoundException
- Specified by:
getChildCommandParsersin interfaceorg.aesh.command.registry.CommandRegistry- Throws:
org.aesh.command.CommandNotFoundException
-
addRegistrationListener
public void addRegistrationListener(org.aesh.command.registry.CommandRegistry.CommandRegistrationListener listener)
- Specified by:
addRegistrationListenerin interfaceorg.aesh.command.registry.CommandRegistry
-
removeRegistrationListener
public void removeRegistrationListener(org.aesh.command.registry.CommandRegistry.CommandRegistrationListener listener)
- Specified by:
removeRegistrationListenerin interfaceorg.aesh.command.registry.CommandRegistry
-
getCommandName
public String getCommandName(org.aesh.command.Command<CLICommandInvocation> command) throws org.aesh.command.parser.CommandLineParserException
- Throws:
org.aesh.command.parser.CommandLineParserException
-
isLegacyCommand
public boolean isLegacyCommand(String name)
-
-