Package edu.uiuc.ncsa.security.util.cli
Class CommonCommands2
- java.lang.Object
- 
- edu.uiuc.ncsa.security.util.cli.AbstractCommandsImpl
- 
- edu.uiuc.ncsa.security.util.cli.CommonCommands2
 
 
- 
- All Implemented Interfaces:
- Logable,- Commands,- Serializable
 - Direct Known Subclasses:
- StoreCommands2,- TestCCI.CCIComponent,- TestCommands
 
 public abstract class CommonCommands2 extends AbstractCommandsImpl Utilities that are used by any reasonable implementation of the Commands interface. You need to extend this for your command processor.Created by Jeff Gaynor 
 on 10/30/13 at 4:14 PM- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description StringplaceHolderThis is used wherever a missing value is.- 
Fields inherited from class edu.uiuc.ncsa.security.util.cli.AbstractCommandsImplCL_INPUT_FILE_FLAG, CL_OUTPUT_FILE_FLAG, DEFAULT_NULL_VALUE_PLACEHOLDER, defaultIndent, INDENT, LOGO, logoName, NO_HEADER, NO_LOGO, showHeader, showLogo, SILENT
 
- 
 - 
Constructor SummaryConstructors Constructor Description CommonCommands2(CLIDriver driver)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IOInterfacegetIOInterface()StringgetPlaceHolder()Gets the placeholder for missing values.protected StringgetValue(String x)Returns the value if it is not empty of a placeholder if it is.protected booleanisEmpty(String x)booleanisThrowExceptions()In methods that take anInputLine, throw and exception rather than report one to the command line.booleanisVerbose()voidprint_help()protected voidsay2(String x)Output the string without any linefeed.protected voidsayii(String x)Double indent -- useful for lists.voidset_output_on(InputLine inputLine)voidset_verbose_on(InputLine inputLine)So batch files can change whether or not they are verboseprotected voidsetOutputOnHelp()voidsetPlaceHolder(String placeHolder)voidsetThrowExceptions(boolean throwExceptions)protected voidsetVerboseHelp()voidversion(InputLine inputLine)protected voidversionHelp()- 
Methods inherited from class edu.uiuc.ncsa.security.util.cli.AbstractCommandsImplabout, bootstrap, bootstrap, clear_env, clearEnvHelp, configureCommands, debug, error, error, get_env, getDriver, getHelpUtil, getInput, getLogoName, getPropertyHelp, gracefulExit, hasLogger, indentWidth, info, initHelp, initialize, isDebugOn, isOk, isShowHeader, isShowLogo, load, print_env, printEnvHelp, printGetEnvHelp, printReadEnvHelp, printSaveEnvHelp, printSetEnvHelp, read_env, readJSON, readline, readline, save_env, say, say, sayi, sayv, set_env, setDebugOn, setDriver, setLogoName, setShowHeader, setShowLogo, showHelp, warn
 
- 
 
- 
- 
- 
Field Detail- 
placeHolderpublic String placeHolder This is used wherever a missing value is.
 
- 
 - 
Constructor Detail- 
CommonCommands2public CommonCommands2(CLIDriver driver) 
 
- 
 - 
Method Detail- 
isThrowExceptionspublic boolean isThrowExceptions() In methods that take anInputLine, throw and exception rather than report one to the command line. This is set to true only if this is being used an a utility in another setting, rather than interactively. There is consequently no way for a user to touch this from the command line.- Returns:
 
 - 
setThrowExceptionspublic void setThrowExceptions(boolean throwExceptions) 
 - 
getIOInterfacepublic IOInterface getIOInterface() - Specified by:
- getIOInterfacein interface- Commands
- Overrides:
- getIOInterfacein class- AbstractCommandsImpl
 
 - 
sayiiprotected void sayii(String x) Double indent -- useful for lists.- Parameters:
- x-
 
 - 
say2protected void say2(String x) Output the string without any linefeed. This is used for prompts.- Parameters:
- x-
 
 - 
isEmptyprotected boolean isEmpty(String x) 
 - 
getPlaceHolderpublic String getPlaceHolder() Gets the placeholder for missing values. E.g. if a value (like a last name) is missing this will be displayed.- Returns:
 
 - 
setPlaceHolderpublic void setPlaceHolder(String placeHolder) 
 - 
getValueprotected String getValue(String x) Returns the value if it is not empty of a placeholder if it is.- Parameters:
- x-
- Returns:
 
 - 
isVerbosepublic boolean isVerbose() 
 - 
setVerboseHelpprotected void setVerboseHelp() 
 - 
set_verbose_onpublic void set_verbose_on(InputLine inputLine) throws Exception So batch files can change whether or not they are verbose- Parameters:
- inputLine-
- Throws:
- Exception
 
 - 
setOutputOnHelpprotected void setOutputOnHelp() 
 - 
versionHelpprotected void versionHelp() 
 - 
versionpublic void version(InputLine inputLine) 
 
- 
 
-