public final class Shell extends Object
get()
.
parse args if no cmd attempt to read from stdin a list of cmds or from a
faile -f if cmd run it. A cmd line instance is parsing a single command.
parsed data is injected into the command and then the command is run. a cmd
type is providing the info on how a command is injected. top level params
are: -h help -u username -p password -f batch file - batch from stdinpublic static Shell get()
public static void reset()
public void addConfigurationListener(ShellConfigurationListener listener)
public void removeConfigurationChangeListener(ShellConfigurationListener listener)
public Properties getSettings()
public boolean getBooleanSetting(String key, boolean defValue)
public File getConfigDir()
public File getSettingsFile()
public File getHistoryFile()
public LinkedHashMap<String,String> getMainArguments()
public LinkedHashMap<String,String> collectArgs(String[] args)
public String[] parse(char[] cbuf)
public void addValueAdapter(ValueAdapter adapter)
public void removeValueAdapter(ValueAdapter adapter)
public void addCompletorProvider(CompletorProvider provider)
public <T> T getContextObject(Class<T> type)
public <T> void putContextObject(Class<T> type, T instance)
public <T> T removeContextObject(Class<T> type)
public CompletorProvider getCompletorProvider()
public void addRegistry(CommandRegistry reg)
public CommandRegistry removeRegistry(String key)
public CommandRegistry getRegistry(String name)
public CommandRegistry[] getRegistries()
public String[] getRegistryNames()
public CommandRegistry getActiveRegistry()
public CommandRegistry setActiveRegistry(String name)
name
- public ShellConsole getConsole()
public void setConsole(ShellConsole console)
public ValueAdapter getValueAdapter()
public void runBatch(List<String> lines) throws ShellException
ShellException
public void run(String cmdline) throws ShellException
ShellException
public void run(String... line) throws ShellException
ShellException
public void run(Runnable cmd) throws ShellException
ShellException
public Runnable newCommand(String cmdline) throws ShellException
ShellException
public Runnable newCommand(String... line) throws ShellException
ShellException
public void hello() throws IOException
IOException
public void bye()
public ShellFeature[] getFeatures()
public <T extends ShellFeature> T getFeature(Class<T> type)
public void addFeature(ShellFeature feature)
public jline.ANSIBuffer newANSIBuffer()
public void loadConfig() throws IOException
IOException
Copyright © 2013 Nuxeo SA. All Rights Reserved.