Package com.sun.identity.cli
Class CLICommandBase
- java.lang.Object
-
- com.sun.identity.cli.CLICommandBase
-
- All Implemented Interfaces:
CLICommand
- Direct Known Subclasses:
AuthenticatedCommand,PrintAllSubCommands
public abstract class CLICommandBase extends Object implements CLICommand
This is the base class for all CLI command implementation.
-
-
Constructor Summary
Constructors Constructor Description CLICommandBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddebugError(String msg)protected voiddebugError(String msg, Throwable e)protected voiddebugMessage(String msg)protected voiddebugWarning(String msg, Throwable e)protected CommandManagergetCommandManager()protected IOutputgetOutputWriter()protected StringgetResourceString(String key)protected StringgetStringOptionValue(String optionName)protected StringgetStringOptionValue(String optionName, String defValue)voidhandleRequest(RequestContext rc)Services a Commandline Request.protected booleanisOptionSet(String key)protected booleanisVerbose()protected Stringtokenize(Collection collection)protected voidwriteLog(int type, Level level, String msgid, String[] msgdata)
-
-
-
Method Detail
-
handleRequest
public void handleRequest(RequestContext rc) throws CLIException
Services a Commandline Request.- Specified by:
handleRequestin interfaceCLICommand- Parameters:
rc- Request Context.- Throws:
CLIException- if the request cannot serviced.
-
isOptionSet
protected boolean isOptionSet(String key)
-
getOutputWriter
protected IOutput getOutputWriter()
-
getCommandManager
protected CommandManager getCommandManager()
-
isVerbose
protected boolean isVerbose()
-
writeLog
protected void writeLog(int type, Level level, String msgid, String[] msgdata) throws CLIException- Throws:
CLIException
-
debugError
protected void debugError(String msg)
-
debugMessage
protected void debugMessage(String msg)
-
tokenize
protected String tokenize(Collection collection)
-
-