Package org.oa4mp.server.api.util
Class AbstractCLIApprover
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.cli.CLITool2
-
- org.oa4mp.server.api.util.AbstractCLIApprover
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable
public abstract class AbstractCLIApprover extends edu.uiuc.ncsa.security.util.cli.CLITool2A 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 compilefrom 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 classAbstractCLIApprover.ClientApprovalThread
-
Field Summary
Fields Modifier and Type Field Description static StringANONYMOUSstatic StringID_DELIMITERstatic StringPOLLING_DIRECTORYstatic StringPOLLING_INTERVALstatic StringTEMP_FILE_PREFIXstatic StringTEMP_FILE_SUFFIX-
Fields inherited from class edu.uiuc.ncsa.security.util.cli.CLITool2
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 voiddoIt()protected StringformatClient(org.oa4mp.delegation.common.storage.clients.Client client)StringgetComponentName()voidhelp()-
Methods inherited from class edu.uiuc.ncsa.security.util.cli.CLITool2
debug, defaultHelp, error, error, getBufferedReader, getConfigFile, getConfigName, getConfigurationNode, getEnvironment, getInputLine, getIoInterface, getLoader, getLogfileName, getMyLogger, getOptions, hasConfigFile, hasConfigName, info, initialize, isDebugOn, isVerbose, readline, run, run, say, say2, sayv, setBufferedReader, setConfigFile, setConfigName, setConfigurationNode, setDebugOn, setEnvironment, setInputLine, setIoInterface, 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:
doItin classedu.uiuc.ncsa.security.util.cli.CLITool2- Throws:
Exception
-
formatClient
protected String formatClient(org.oa4mp.delegation.common.storage.clients.Client client)
-
getComponentName
public String getComponentName()
- Specified by:
getComponentNamein classedu.uiuc.ncsa.security.util.cli.CLITool2
-
help
public void help()
- Specified by:
helpin classedu.uiuc.ncsa.security.util.cli.CLITool2
-
-