public abstract class AbstractCommandContext extends Object implements CommandContext, org.alfresco.bm.server.ConfigConstants
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CMD_EXIT |
protected static String |
CMD_HELP |
protected static String |
CMD_HELP_SHORT |
DEFAULT_RUNSTATE, DEFAULT_SERVER_ID, EXT_JAR, EXT_PROPERTIES, EXT_XML, PATH_CLASSES, PATH_CLUSTER_PROPERTIES, PATH_CLUSTERS, PATH_CONFIG, PATH_JARS, PATH_LOADED, PATH_RUN_PROPERTIES, PATH_RUNS, PATH_SERVER, PATH_SERVERS, PATH_TEST_CONTEXT, PATH_TEST_PROPERTIES, PATH_TESTS, PROP_CLUSTER, PROP_CONTROL_RUN_STATE, PROP_EVENTS_THREAD_COUNT, PROP_EVENTS_THREAD_EVENTSPERSECONDPERTHREAD, PROP_EVENTS_THREAD_WAITFORCOMPLETION, PROP_HTTP_CONNECTION_MAX, PROP_HTTP_CONNECTION_TIMEOUT_MS, PROP_HTTP_SOCKET_TIMEOUT_MS, PROP_HTTP_SOCKET_TTL_MS, PROP_MONGO_AUTOCONNECTRETRY, PROP_MONGO_CONNECTIONSPERHOST, PROP_MONGO_SOCKETTIMEOUT, PROP_MONGO_URI, PROP_MONGO_WRITENUMBER, PROP_SERVER_ID, PROP_TEST_NAME, PROP_TEST_RUN_FQN, PROP_TEST_RUN_NAME, SEPARATOR| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCommandContext()
Common initialization
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addPathElementsLocation(List<String> pathElements)
Help build path elements.
|
CommandContext |
executeCommand(String command)
For this to have been called, we have to assume that the command has
not been recognized further down the hierarchy.
|
protected TreeMap<String,String> |
getCommands()
Override to provide a set of available commands
|
protected File |
getCurrentDir()
Get the current user directory for file selection operations
|
String |
getLocation()
Get the current path for the command context
|
protected Map<String,String> |
getOrderedProperties(Properties props)
Helper method to order properties by key
|
protected void |
setCurrentDir(File file)
Set the current user directory for file selection operations
|
protected static final String CMD_HELP
protected static final String CMD_HELP_SHORT
protected static final String CMD_EXIT
protected TreeMap<String,String> getCommands()
protected File getCurrentDir()
protected void setCurrentDir(File file)
public String getLocation()
getLocation in interface CommandContextprotected abstract void addPathElementsLocation(List<String> pathElements)
pathElements - elements to append topublic CommandContext executeCommand(String command)
executeCommand in interface CommandContextcommand - the command to executeprotected Map<String,String> getOrderedProperties(Properties props)
Copyright © 2013. All Rights Reserved.