Package com.sun.identity.cli
Class RequestContext
- java.lang.Object
-
- com.sun.identity.cli.RequestContext
-
public class RequestContext extends Object
Request context class contains information about the request. This object is passed to sub command handler which services the request.
-
-
Constructor Summary
Constructors Constructor Description RequestContext(CLIRequest request, CommandManager commandMgr, SubCommand subcmd)Creates a request context object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CLIRequestgetCLIRequest()Returns CLI Request object.CommandManagergetCommandManager()Returns theCommandManagerobject.ListgetOption(String name)Returns values of an argument/option.MapgetOptions()Returns a map of argument/option to its values (List).StringgetResourceString(String key)Returns resource string.SubCommandgetSubCommand()Returns sub command object.
-
-
-
Constructor Detail
-
RequestContext
public RequestContext(CLIRequest request, CommandManager commandMgr, SubCommand subcmd) throws CLIException
Creates a request context object.- Parameters:
request- Request object.commandMgr- Command Manager object.subcmd- Sub Command object.- Throws:
CLIException- if this object cannot be constructed.
-
-
Method Detail
-
getCommandManager
public CommandManager getCommandManager()
Returns theCommandManagerobject.- Returns:
- the
CommandManagerobject.
-
getCLIRequest
public CLIRequest getCLIRequest()
Returns CLI Request object.- Returns:
- CLI Request object.
-
getSubCommand
public SubCommand getSubCommand()
Returns sub command object.- Returns:
- sub command object.
-
getResourceString
public String getResourceString(String key)
Returns resource string.- Parameters:
key- Key of resource string.- Returns:
- resource string.
-
getOption
public List getOption(String name)
Returns values of an argument/option.- Returns:
- values of an argument/option.
-
getOptions
public Map getOptions()
Returns a map of argument/option to its values (List).- Returns:
- a map of argument/option to its values.
-
-