public abstract class AbstractCLIApprover extends CLITool
mvn compile
from the command line to compile it mvn exec:java -Dexec.mainClass="edu.uiuc.ncsa.myproxy.oa4mp.server.util.CLIApprover" -Dexec.args="-cfg /path/to/config.xml -name config-name"
ServiceEnvironment
, which is normally loaded using a
ConfigurationLoader
.
Created by Jeff Gaynor
on 2/24/12 at 2:40 PM
Modifier and Type | Class and Description |
---|---|
static class |
AbstractCLIApprover.ClientApprovalThread |
Modifier and Type | Field and Description |
---|---|
static String |
ANONYMOUS |
static String |
ID_DELIMITER |
static String |
POLLING_DIRECTORY |
static String |
POLLING_INTERVAL |
static String |
TEMP_FILE_PREFIX |
static String |
TEMP_FILE_SUFFIX |
CONFIG_FILE_LONG_OPTION, CONFIG_FILE_OPTION, CONFIG_NAME_ACTION, CONFIG_NAME_LONG_OPTION, CONFIG_NAME_OPTION, DEBUG_LONG_OPTION, DEBUG_OPTION, DEFAULT_LOG_FILE, HELP_LONG_OPTION, HELP_OPTION, LOG_FILE_LONG_OPTION, LOG_FILE_OPTION, NO_ACTION, VERBOSE_LONG_OPTION, VERBOSE_OPTION
Constructor and Description |
---|
AbstractCLIApprover() |
Modifier and Type | Method and Description |
---|---|
void |
doIt()
Does the actual work.
|
protected String |
formatClient(Client client) |
String |
getComponentName()
Returns the name of the configuration component (usually "server" or "client") that identifies the XML
elements which might have the configuration.
|
protected org.apache.commons.cli.Options |
getOptions()
Override this to set up your options.
|
void |
help()
This will be automatically invoked for you if the user supplies a help option.
|
checkAction, debug, defaultHelp, error, error, getAction, getBufferedReader, getCommandLine, getConfigFile, getConfigurationNode, getEnvironment, getLoader, getLogfileName, getMyLogger, getOptions, hasOption, info, initialize, isDebugOn, isVerbose, parseCommandLine, readline, run, run, say, say2, sayv, setAction, setBufferedReader, setCommandLine, setConfigFile, setConfigurationNode, setDebugOn, setEnvironment, setLogfileName, setMyLogger, setVerbose, warn
public static final String ANONYMOUS
public static final String POLLING_INTERVAL
public static final String POLLING_DIRECTORY
public static final String TEMP_FILE_PREFIX
public static final String TEMP_FILE_SUFFIX
public static final String ID_DELIMITER
public void doIt() throws Exception
CLITool
public String getComponentName()
CLITool
getComponentName
in class CLITool
protected org.apache.commons.cli.Options getOptions()
CLITool
Options options = super.getOptions();
options.addOptions(SHORT_FORM, LONG_FORM, ... // This is in the commons documentation
checkAction(SHORT_FORM, LONG_FORM, ACTION_CODE);
CLITool.getAction()
call in
a switch statement.getOptions
in class CLITool
public void help()
CLITool
CLITool.say(String)
method), rather than logging
the help.Copyright © 2019. All Rights Reserved.