public class GroovyCommandManager extends CRaSHPlugin<CommandManager> implements CommandManager
| Modifier and Type | Field and Description |
|---|---|
(package private) static Set<String> |
EXT
.
|
(package private) static Logger |
log
.
|
private GroovyClassFactory<Object> |
objectGroovyClassFactory
.
|
private AbstractClassCache<GroovyScript> |
scriptCache
.
|
CONSTRUCTED, FAILED, INITIALIZED, INITIALIZING| Constructor and Description |
|---|
GroovyCommandManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy(HashMap<String,Object> session) |
String |
doCallBack(HashMap<String,Object> session,
String name,
String defaultValue) |
private String |
eval(HashMap<String,Object> session,
String name,
String def) |
Set<String> |
getExtensions()
Returns the set of extensions managed by this implementation.
|
groovy.lang.GroovyShell |
getGroovyShell(Map<String,Object> session) |
static groovy.lang.GroovyShell |
getGroovyShell(PluginContext context,
Map<String,Object> session)
The underlying groovu shell used for the REPL.
|
CommandManager |
getImplementation()
Returns the implementation.
|
GroovyScript |
getLifeCycle(HashMap<String,Object> session,
String name) |
void |
init()
Implement this method to know about init life cycle callback.
|
void |
init(HashMap<String,Object> session) |
private <C extends BaseCommand> |
make(Class<C> clazz) |
private <C extends GroovyScriptCommand> |
make2(Class<C> clazz) |
ShellCommand |
resolveCommand(String name,
byte[] source)
Resolve a command for the specified command name.
|
createConfigurationCapabilities, destroy, getConfigurationCapabilities, getContext, getStatus, getType, toStringprivate AbstractClassCache<GroovyScript> scriptCache
private GroovyClassFactory<Object> objectGroovyClassFactory
public GroovyCommandManager()
public CommandManager getImplementation()
CRaSHPlugingetImplementation in class CRaSHPlugin<CommandManager>public Set<String> getExtensions()
CommandManagergetExtensions in interface CommandManagerpublic void init()
CRaSHPlugininit in class CRaSHPlugin<CommandManager>public String doCallBack(HashMap<String,Object> session, String name, String defaultValue)
doCallBack in interface CommandManagerpublic void init(HashMap<String,Object> session)
init in interface CommandManagerpublic void destroy(HashMap<String,Object> session)
destroy in interface CommandManagerpublic groovy.lang.GroovyShell getGroovyShell(Map<String,Object> session)
public static groovy.lang.GroovyShell getGroovyShell(PluginContext context, Map<String,Object> session)
public GroovyScript getLifeCycle(HashMap<String,Object> session, String name) throws CommandCreationException, NullPointerException
public ShellCommand resolveCommand(String name, byte[] source) throws CommandCreationException, NullPointerException
CommandManagerresolveCommand in interface CommandManagername - the command namesource - the command sourceCommandCreationException - when the command exists but cannot be createdNullPointerException - if the command name is nullprivate <C extends BaseCommand> BaseShellCommand<C> make(Class<C> clazz)
private <C extends GroovyScriptCommand> GroovyScriptShellCommand<C> make2(Class<C> clazz)
Copyright © 2013 eXo Platform SAS. All Rights Reserved.