| Modifier and Type | Field and Description |
|---|---|
(package private) HashMap<String,CommandManager> |
activeManagers
.
|
private Map<String,TimestampedObject<CommandResolution>> |
commandCache
.
|
(package private) PluginContext |
context
.
|
private static HashMap<String,Class<? extends BaseCommand>> |
systemCommands
.
|
| Constructor and Description |
|---|
CRaSH(PluginContext context)
Create a new CRaSH.
|
| Modifier and Type | Method and Description |
|---|---|
private <C extends BaseCommand> |
createCommand(Class<C> commandClass) |
CRaSHSession |
createSession(Principal user) |
ShellCommand<?> |
getCommand(String name)
Attempt to obtain a command instance.
|
String |
getCommandDescription(String name)
Attempt to obtain a command description.
|
Iterable<String> |
getCommandNames() |
PluginContext |
getContext()
Returns the plugin context.
|
private CommandResolution |
resolveCommand(CommandManager manager,
String name,
Resource script) |
CommandResolution |
resolveCommand(String name)
Attempt to obtain a command instance.
|
private static final HashMap<String,Class<? extends BaseCommand>> systemCommands
final PluginContext context
final HashMap<String,CommandManager> activeManagers
private final Map<String,TimestampedObject<CommandResolution>> commandCache
public CRaSH(PluginContext context) throws NullPointerException
context - the plugin contextNullPointerException - if the context argument is nullpublic CRaSHSession createSession(Principal user)
public PluginContext getContext()
public String getCommandDescription(String name) throws CommandCreationException, NullPointerException
name - the command nameCommandCreationException - if an error occured preventing the command creationNullPointerException - if the name argument is nullpublic ShellCommand<?> getCommand(String name) throws CommandCreationException, NullPointerException
name - the command nameCommandCreationException - if an error occured preventing the command creationNullPointerException - if the name argument is nullpublic CommandResolution resolveCommand(String name) throws CommandCreationException, NullPointerException
name - the command nameCommandCreationException - if an error occured preventing the command creationNullPointerException - if the name argument is nullpublic Iterable<String> getCommandNames()
private CommandResolution resolveCommand(CommandManager manager, String name, Resource script) throws CommandCreationException
CommandCreationExceptionprivate <C extends BaseCommand> CommandResolution createCommand(Class<C> commandClass)
Copyright © 2014 eXo Platform SAS. All Rights Reserved.