@Singleton public class CommandRegistryImpl extends Object implements CommandRegistry
CommandRegistry
component.Constructor and Description |
---|
CommandRegistryImpl(EventManager events) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsCommand(String name) |
CommandAction |
getCommand(String name) |
Collection<String> |
getCommandNames() |
Collection<CommandAction> |
getCommands() |
void |
registerCommand(String name,
CommandAction command) |
void |
removeCommand(String name) |
@Inject public CommandRegistryImpl(EventManager events)
public void registerCommand(String name, CommandAction command) throws DuplicateCommandException
registerCommand
in interface CommandRegistry
DuplicateCommandException
public void removeCommand(String name) throws NoSuchCommandException
removeCommand
in interface CommandRegistry
NoSuchCommandException
public CommandAction getCommand(String name) throws NoSuchCommandException
getCommand
in interface CommandRegistry
NoSuchCommandException
public boolean containsCommand(String name)
containsCommand
in interface CommandRegistry
public Collection<String> getCommandNames()
getCommandNames
in interface CommandRegistry
public Collection<CommandAction> getCommands()
getCommands
in interface CommandRegistry
Copyright © 2008-2012 Sonatype. All Rights Reserved.