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 Summary
Fields Modifier and Type Field Description String
placeHolder
This is used wherever a missing value is.-
Fields inherited from class edu.uiuc.ncsa.security.util.cli.AbstractCommandsImpl
CL_INPUT_FILE_FLAG, CL_OUTPUT_FILE_FLAG, DEFAULT_NULL_VALUE_PLACEHOLDER, defaultIndent, INDENT, LOGO, logoName, NO_HEADER, NO_LOGO, showHeader, showLogo, SILENT
-
-
Constructor Summary
Constructors Constructor Description CommonCommands2(CLIDriver driver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IOInterface
getIOInterface()
String
getPlaceHolder()
Gets the placeholder for missing values.protected String
getValue(String x)
Returns the value if it is not empty of a placeholder if it is.protected boolean
isEmpty(String x)
boolean
isVerbose()
void
print_help()
protected void
say2(String x)
Output the string without any linefeed.protected void
sayii(String x)
Double indent -- useful for lists.void
set_output_on(InputLine inputLine)
void
set_verbose_on(InputLine inputLine)
So batch files can change whether or not they are verboseprotected void
setOutputOnHelp()
void
setPlaceHolder(String placeHolder)
protected void
setVerboseHelp()
void
version(InputLine inputLine)
protected void
versionHelp()
-
Methods inherited from class edu.uiuc.ncsa.security.util.cli.AbstractCommandsImpl
about, bootstrap, bootstrap, clear_env, clearEnvHelp, 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
-
placeHolder
public String placeHolder
This is used wherever a missing value is.
-
-
Constructor Detail
-
CommonCommands2
public CommonCommands2(CLIDriver driver)
-
-
Method Detail
-
getIOInterface
public IOInterface getIOInterface()
- Specified by:
getIOInterface
in interfaceCommands
- Overrides:
getIOInterface
in classAbstractCommandsImpl
-
sayii
protected void sayii(String x)
Double indent -- useful for lists.- Parameters:
x
-
-
say2
protected void say2(String x)
Output the string without any linefeed. This is used for prompts.- Parameters:
x
-
-
isEmpty
protected boolean isEmpty(String x)
-
getPlaceHolder
public String getPlaceHolder()
Gets the placeholder for missing values. E.g. if a value (like a last name) is missing this will be displayed.- Returns:
-
setPlaceHolder
public void setPlaceHolder(String placeHolder)
-
getValue
protected String getValue(String x)
Returns the value if it is not empty of a placeholder if it is.- Parameters:
x
-- Returns:
-
isVerbose
public boolean isVerbose()
-
setVerboseHelp
protected void setVerboseHelp()
-
set_verbose_on
public void set_verbose_on(InputLine inputLine) throws Exception
So batch files can change whether or not they are verbose- Parameters:
inputLine
-- Throws:
Exception
-
setOutputOnHelp
protected void setOutputOnHelp()
-
versionHelp
protected void versionHelp()
-
version
public void version(InputLine inputLine)
-
-