public class ToolsArgumentHelper extends Object
| Constructor and Description |
|---|
ToolsArgumentHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getCliEnvArgumentValue(ArgumentParser argParser,
org.apache.commons.cli.Option cliOpt,
org.apache.commons.cli.Option enableEnvVariablesOpt)
Retrieves the user provided password, fetch cli provided password first, otherwise fetch environment provided password if enableEnvVariables option is
true
|
static void |
validateCliEnvArgument(ArgumentParser argParser,
org.apache.commons.cli.Option cliOpt,
org.apache.commons.cli.Option enableEnvVariablesOpt)
Validate cli option and env parameter
|
public static void validateCliEnvArgument(ArgumentParser argParser, org.apache.commons.cli.Option cliOpt, org.apache.commons.cli.Option enableEnvVariablesOpt) throws org.apache.commons.cli.ParseException
argParser - argument parser instancecliOpt - cli optionenableEnvVariablesOpt - enableEnvVariables cli optionorg.apache.commons.cli.ParseException - when neither is providedpublic static String getCliEnvArgumentValue(ArgumentParser argParser, org.apache.commons.cli.Option cliOpt, org.apache.commons.cli.Option enableEnvVariablesOpt) throws org.apache.commons.cli.ParseException
argParser - argument parser instancecliOpt - cli optionenableEnvVariablesOpt - enableEnvVariables cli optionorg.apache.commons.cli.ParseException - if the value of the argument is an invalid boolean valueCopyright © 2021. All rights reserved.