Class 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
    • Method Detail

      • addCommand

        public org.aesh.command.container.CommandContainer addCommand​(org.aesh.command.Command<?> command)
                                                               throws CommandLineException,
                                                                      org.aesh.command.parser.CommandLineParserException
        Throws:
        CommandLineException
        org.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.CommandLineParserException
        CommandLineException
      • 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:
        CommandLineException
        org.aesh.command.parser.CommandLineParserException
      • getCommand

        public org.aesh.command.container.CommandContainer<CLICommandInvocation> getCommand​(String name,
                                                                                            String line)
                                                                                     throws org.aesh.command.CommandNotFoundException
        Specified by:
        getCommand in interface org.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:
        completeCommandName in interface org.aesh.command.registry.CommandRegistry
      • getAllCommandNames

        public Set<String> getAllCommandNames()
        Specified by:
        getAllCommandNames in interface org.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:
        getCommandByAlias in interface org.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:
        getChildCommandParsers in interface org.aesh.command.registry.CommandRegistry
        Throws:
        org.aesh.command.CommandNotFoundException
      • addRegistrationListener

        public void addRegistrationListener​(org.aesh.command.registry.CommandRegistry.CommandRegistrationListener listener)
        Specified by:
        addRegistrationListener in interface org.aesh.command.registry.CommandRegistry
      • removeRegistrationListener

        public void removeRegistrationListener​(org.aesh.command.registry.CommandRegistry.CommandRegistrationListener listener)
        Specified by:
        removeRegistrationListener in interface org.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
      • getAvailableAeshCommands

        public List<String> getAvailableAeshCommands()
      • isLegacyCommand

        public boolean isLegacyCommand​(String name)