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 classTestCCI.CCIComponentstatic classTestCCI.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 voidabout(boolean showBanner, boolean showHeader)This will show the boot up logos, header (additional info) etc.protected TestCCI.TCLfigureOutLoader(String fileName, String configName)This is done so configurations can be loaded by inheritors.StringgetComponentName()For the configuration.TestCCI.TCLgetLoader()StringgetName()StringgetPrompt()The prompt displayed to the user.TestEnvironmentgetTestEnvironment()voidload(InputLine inputLine)Load resources before showing logos etc.static voidmain(String[] args)voidsetLoader(ConfigurationLoader<? extends AbstractEnvironment> loader)booleanuse(InputLine inputLine)Override this to invoke the specific components that make up your CLI.voiduseHelp()-
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, configureCommands, 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:ConfigurableCommandsImpl2For 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:
getComponentNamein classConfigurableCommandsImpl2- Returns:
-
getTestEnvironment
public TestEnvironment getTestEnvironment() throws Exception
- Throws:
Exception
-
getLoader
public TestCCI.TCL getLoader()
- Specified by:
getLoaderin classConfigurableCommandsImpl2
-
load
public void load(InputLine inputLine) throws Throwable
Description copied from class:AbstractCommandsImplLoad 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:
loadin classConfigurableCommandsImpl2- Throws:
Throwable
-
setLoader
public void setLoader(ConfigurationLoader<? extends AbstractEnvironment> loader)
- Specified by:
setLoaderin classConfigurableCommandsImpl2
-
figureOutLoader
protected TestCCI.TCL figureOutLoader(String fileName, String configName) throws Throwable
Description copied from class:ConfigurableCommandsImpl2This is done so configurations can be loaded by inheritors.- Specified by:
figureOutLoaderin classConfigurableCommandsImpl2- Returns:
- Throws:
Throwable
-
useHelp
public void useHelp()
- Specified by:
useHelpin classConfigurableCommandsImpl2
-
getPrompt
public String getPrompt()
Description copied from interface:CommandsThe 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:AbstractCommandsImplThis will show the boot up logos, header (additional info) etc. if any- Specified by:
aboutin classAbstractCommandsImpl
-
use
public boolean use(InputLine inputLine) throws Throwable
Description copied from class:ConfigurableCommandsImpl2Override this to invoke the specific components that make up your CLI.- Overrides:
usein classConfigurableCommandsImpl2- Returns:
- Throws:
ExceptionThrowable
-
main
public static void main(String[] args)
-
-