|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.shibboleth.metadata.cli.SimpleCommandLineArguments
public class SimpleCommandLineArguments
Command line arguments for the SimpleCommandLine command line tool.
| Field Summary | |
|---|---|
private jargs.gnu.CmdLineParser |
cliParser
The configured command line parser. |
private boolean |
help
Help has been requested. |
private jargs.gnu.CmdLineParser.Option |
helpOption
Option object for the --help option. |
private String |
inFile
Provided input file name for the Spring configuration file. |
private String |
logConfig
Name of a specific logging configuration, if one has been requested. |
private jargs.gnu.CmdLineParser.Option |
logConfigOption
Option object for the --logConfig option. |
private String |
pipelineName
Provided name for the pipeline bean to execute. |
private boolean |
quiet
Quiet logging has been requested. |
private jargs.gnu.CmdLineParser.Option |
quietOption
Option object for the --quiet option. |
private boolean |
verbose
Verbose logging has been requested. |
private jargs.gnu.CmdLineParser.Option |
verboseOption
Option object for the --verbose option. |
| Constructor Summary | |
|---|---|
SimpleCommandLineArguments()
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
doHelp()
Indicates the presence of the --help option. |
boolean |
doQuietOutput()
Indicates the presence of the --quiet option. |
boolean |
doVerboseOutput()
Indicates the presence of the --verbose option. |
private void |
errorAndExit(String error)
Prints the error message to STDERR and then exits. |
String |
getInputFile()
Gets the parsed input file name from the command line. |
String |
getLoggingConfiguration()
Gets the name of the requested logging configuration file from the command line. |
String |
getPipelineName()
Returns the name of the pipeline bean to execute from the command line. |
void |
parseCommandLineArguments(String[] args)
Parse an array of command-line arguments as passed to the main program. |
void |
printHelp(PrintStream out)
Print command line help instructions. |
private void |
validateCommandLineArguments()
Validate the provided command line arguments, for example issuing an error if they are inconsistent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Nullable private String inFile
@Nullable private String pipelineName
private boolean verbose
@Nonnull private final jargs.gnu.CmdLineParser.Option verboseOption
--verbose option.
private boolean quiet
@Nonnull private final jargs.gnu.CmdLineParser.Option quietOption
--quiet option.
@Nullable private String logConfig
@Nonnull private final jargs.gnu.CmdLineParser.Option logConfigOption
--logConfig option.
private boolean help
@Nonnull private final jargs.gnu.CmdLineParser.Option helpOption
--help option.
@Nonnull private final jargs.gnu.CmdLineParser cliParser
| Constructor Detail |
|---|
public SimpleCommandLineArguments()
| Method Detail |
|---|
public void parseCommandLineArguments(String[] args)
args - array of command-line arguments to parse.@Nullable public String getInputFile()
@Nullable public String getPipelineName()
public boolean doVerboseOutput()
--verbose option.
true if the user requested verbose logging.public boolean doQuietOutput()
--quiet option.
true if the user requested quiet logging.@Nullable public String getLoggingConfiguration()
null.public boolean doHelp()
--help option.
true if the user requested help.private void validateCommandLineArguments()
public void printHelp(PrintStream out)
out - location where to print the outputprivate void errorAndExit(String error)
error - the error message
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||