Package edu.uiuc.ncsa.security.util.cli
Class TestCCI
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.cli.AbstractCommandsImpl
-
- edu.uiuc.ncsa.security.util.cli.ConfigurableCommandsImpl2
-
- edu.uiuc.ncsa.security.util.cli.TestCCI
-
- All Implemented Interfaces:
Logable
,Commands
,Serializable
public class TestCCI extends ConfigurableCommandsImpl2
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
TestCCI.CCIComponent
static class
TestCCI.TCL
-
Nested classes/interfaces inherited from class edu.uiuc.ncsa.security.util.cli.ConfigurableCommandsImpl2
ConfigurableCommandsImpl2.ListOnlyNotification
-
-
Field Summary
-
Fields inherited from class edu.uiuc.ncsa.security.util.cli.ConfigurableCommandsImpl2
CFG_FILE_SWITCH, CONFIG_FILE_LONG_OPTION, CONFIG_FILE_OPTION, CONFIG_NAME_LONG_OPTION, CONFIG_NAME_OPTION
-
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
about(boolean showBanner, boolean showHeader)
This will show the boot up logos, header (additional info) etc.protected TestCCI.TCL
figureOutLoader(String fileName, String configName)
This is done so configurations can be loaded by inheritors.String
getComponentName()
For the configuration.TestCCI.TCL
getLoader()
String
getName()
String
getPrompt()
The prompt displayed to the user.TestEnvironment
getTestEnvironment()
void
load(InputLine inputLine)
Load resources before showing logos etc.static void
main(String[] args)
void
setLoader(ConfigurationLoader<? extends AbstractEnvironment> loader)
boolean
use(InputLine inputLine)
Override this to invoke the specific components that make up your CLI.void
useHelp()
-
Methods inherited from class edu.uiuc.ncsa.security.util.cli.ConfigurableCommandsImpl2
bootstrap, doListNames, getConfigFile, getConfigName, getEnvironment, initHelp, initialize, listConfigs, listXMLConfigs, loadConfig, setConfigFile, setConfigName, setDriver, setEnvironment, showLoadHelp, switchOrRun
-
Methods inherited from class edu.uiuc.ncsa.security.util.cli.AbstractCommandsImpl
bootstrap, clear_env, clearEnvHelp, debug, error, error, get_env, getDriver, getHelpUtil, getInput, getIOInterface, getLogoName, getPropertyHelp, gracefulExit, hasLogger, indentWidth, info, isDebugOn, isOk, isShowHeader, isShowLogo, print_env, printEnvHelp, printGetEnvHelp, printReadEnvHelp, printSaveEnvHelp, printSetEnvHelp, read_env, readJSON, readline, readline, save_env, say, say, sayi, sayv, set_env, setDebugOn, setLogoName, setShowHeader, setShowLogo, showHelp, warn
-
-
-
-
Constructor Detail
-
TestCCI
public TestCCI(CLIDriver driver)
-
-
Method Detail
-
getComponentName
public String getComponentName()
Description copied from class:ConfigurableCommandsImpl2
For the configuration. This is the tag name (e.g. "client" or "server") in the XML file. Note this is used by subclasses in other projects.- Specified by:
getComponentName
in classConfigurableCommandsImpl2
- Returns:
-
getTestEnvironment
public TestEnvironment getTestEnvironment() throws Exception
- Throws:
Exception
-
getLoader
public TestCCI.TCL getLoader()
- Specified by:
getLoader
in classConfigurableCommandsImpl2
-
load
public void load(InputLine inputLine) throws Throwable
Description copied from class:AbstractCommandsImpl
Load resources before showing logos etc. This is typically called on your behalf inAbstractCommandsImpl.bootstrap(InputLine)
amd should load resources needed. Note that an exception in this does not stop booting. This allows you to start a system with a missing configuration file (for instnace) and prompt for it.
SeeAbstractCommandsImpl.initialize()
which is called after this and is charged with actually starting- Overrides:
load
in classConfigurableCommandsImpl2
- Throws:
Throwable
-
setLoader
public void setLoader(ConfigurationLoader<? extends AbstractEnvironment> loader)
- Specified by:
setLoader
in classConfigurableCommandsImpl2
-
figureOutLoader
protected TestCCI.TCL figureOutLoader(String fileName, String configName) throws Throwable
Description copied from class:ConfigurableCommandsImpl2
This is done so configurations can be loaded by inheritors.- Specified by:
figureOutLoader
in classConfigurableCommandsImpl2
- Returns:
- Throws:
Throwable
-
useHelp
public void useHelp()
- Specified by:
useHelp
in classConfigurableCommandsImpl2
-
getPrompt
public String getPrompt()
Description copied from interface:Commands
The prompt displayed to the user. This allows it to change based on context.- Returns:
- java.lang.String
-
getName
public String getName()
-
about
public void about(boolean showBanner, boolean showHeader)
Description copied from class:AbstractCommandsImpl
This will show the boot up logos, header (additional info) etc. if any- Specified by:
about
in classAbstractCommandsImpl
-
use
public boolean use(InputLine inputLine) throws Throwable
Description copied from class:ConfigurableCommandsImpl2
Override this to invoke the specific components that make up your CLI.- Overrides:
use
in classConfigurableCommandsImpl2
- Returns:
- Throws:
Exception
Throwable
-
main
public static void main(String[] args)
-
-