Class AbstractCLIApprover
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.cli.CLITool
-
- org.oa4mp.server.api.util.AbstractCLIApprover
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable
- Direct Known Subclasses:
CLIApprover
public abstract class AbstractCLIApprover extends edu.uiuc.ncsa.security.util.cli.CLITool
A command line approver. This has a couple of modes of operation.- Immediate updates for non-memory store. If you commit a change, it is done instantly
- Polling mode. A directory is set aside to store the pending approvals. The server polls this at intervals and updates it store. This is especially useful for memory stores.
Use
You should invoke this from the command line and specify the server configuration file. You will have to run this with sufficient permissions to read that file, which probably means running this as root.Running it from maven
To run this from maven directly, you need to follow these three steps:- run
mvn compile
from the command line to compile it - Issue
mvn exec:java -Dexec.mainClass="edu.uiuc.ncsa.myproxy.oa4mp.server.util.CLIApprover" -Dexec.args="-cfg /path/to/config.xml -name config-name"
r> - Follow the on-screen prompts.
Custom versions
This requires the right runtimeServiceEnvironment
, which is normally loaded using aConfigurationLoader
.Created by Jeff Gaynor
on 2/24/12 at 2:40 PM
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractCLIApprover.ClientApprovalThread
-
Field Summary
Fields Modifier and Type Field 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
-
Fields inherited from class edu.uiuc.ncsa.security.util.cli.CLITool
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 Summary
Constructors Constructor Description AbstractCLIApprover()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doIt()
protected String
formatClient(Client client)
String
getComponentName()
protected org.apache.commons.cli.Options
getOptions()
void
help()
-
Methods inherited from class edu.uiuc.ncsa.security.util.cli.CLITool
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
-
-
-
-
Field Detail
-
ANONYMOUS
public static final String ANONYMOUS
- See Also:
- Constant Field Values
-
POLLING_INTERVAL
public static final String POLLING_INTERVAL
- See Also:
- Constant Field Values
-
POLLING_DIRECTORY
public static final String POLLING_DIRECTORY
- See Also:
- Constant Field Values
-
TEMP_FILE_PREFIX
public static final String TEMP_FILE_PREFIX
- See Also:
- Constant Field Values
-
TEMP_FILE_SUFFIX
public static final String TEMP_FILE_SUFFIX
- See Also:
- Constant Field Values
-
ID_DELIMITER
public static final String ID_DELIMITER
- See Also:
- Constant Field Values
-
-
Method Detail
-
doIt
public void doIt() throws Exception
- Specified by:
doIt
in classedu.uiuc.ncsa.security.util.cli.CLITool
- Throws:
Exception
-
getComponentName
public String getComponentName()
- Specified by:
getComponentName
in classedu.uiuc.ncsa.security.util.cli.CLITool
-
getOptions
protected org.apache.commons.cli.Options getOptions()
- Overrides:
getOptions
in classedu.uiuc.ncsa.security.util.cli.CLITool
-
help
public void help()
- Specified by:
help
in classedu.uiuc.ncsa.security.util.cli.CLITool
-
-