org.sonatype.gshell.command.registry
Class CommandRegistryImpl
java.lang.Object
org.sonatype.gshell.command.registry.CommandRegistryImpl
- All Implemented Interfaces:
- CommandRegistry
@Singleton
public class CommandRegistryImpl
- extends Object
- implements CommandRegistry
CommandRegistry component.
- Since:
- 2.5
- Author:
- Jason Dillon
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandRegistryImpl
@Inject
public CommandRegistryImpl(EventManager events)
registerCommand
public void registerCommand(String name,
CommandAction command)
throws DuplicateCommandException
- Specified by:
registerCommand in interface CommandRegistry
- Throws:
DuplicateCommandException
removeCommand
public void removeCommand(String name)
throws NoSuchCommandException
- Specified by:
removeCommand in interface CommandRegistry
- Throws:
NoSuchCommandException
getCommand
public CommandAction getCommand(String name)
throws NoSuchCommandException
- Specified by:
getCommand in interface CommandRegistry
- Throws:
NoSuchCommandException
containsCommand
public boolean containsCommand(String name)
- Specified by:
containsCommand in interface CommandRegistry
getCommandNames
public Collection<String> getCommandNames()
- Specified by:
getCommandNames in interface CommandRegistry
getCommands
public Collection<CommandAction> getCommands()
- Specified by:
getCommands in interface CommandRegistry
Copyright © 2008-2011 Sonatype. All Rights Reserved.