Expected format is "CONFIG [options]", where CONFIG is the built-in configuration name or
a file path to a configuration xml file.
Parameters
arrayArgs
String: the command line arguments
unconsumedArgs
: a List which will be populated with the arguments that were not
consumed by the Objects associated with the specified config. If this
is null, then the implementation will throw
ConfigurationException if any unprocessed args remain.
public IConfiguration createConfigurationFromArgs (String[] arrayArgs,
unconsumedArgs,
IKeyStoreClient keyStoreClient)
Create the IConfiguration from command line arguments with a key store.
Expected format is "CONFIG [options]", where CONFIG is the built-in configuration name or
a file path to a configuration xml file.
Parameters
arrayArgs
String: the command line arguments
unconsumedArgs
: a List which will be populated with the arguments that were not
consumed by the Objects associated with the specified config. If this
is null, then the implementation will throw
ConfigurationException if any unprocessed args remain.
keyStoreClient
IKeyStoreClient: a IKeyStoreClient which is used to obtain sensitive info in
the args.
public getConfigList (String subPath,
boolean loadFromEnv)
Variation of getConfigList() where can specify whether or not we also want to load
the configuration from the environment.
Parameters
subPath
String: name of the sub-directories to look in for configuration. If null, will have
the same behavior as getConfigList().
loadFromEnv
boolean: True if we should load the configuration in the environment variable.
Returns
getConfigList
public getConfigList ()
Return the list of names of all the configs found in the JARs on the classpath.
Does not attempt to load any of the configs, so it is possible to have non working config
in this list.
Utility method that checks that all configs can be loaded, parsed, and
all option values set.
Only exposed so that depending project can validate their configs.
Should not be exposed in the console.
public void printHelpForConfig (String[] args,
boolean importantOnly,
PrintStream out)
Prints help output for the IConfiguration specified in command line arguments,
If 'args' refers to a known configuration, a IConfiguration object will be created
from XML, and help for that IConfiguration will be outputted. Note all other 'args'
values will be ignored (ie the help text will describe the current values of Options
as loaded from XML, and will not reflect option's values set by the command line args.
If 'args' does not reference a known IConfiguration, the generic
printHelp(PrintStream) help will be displayed.
Parameters
args
String: the command line arguments
importantOnly
boolean: if true, print an abbreviated help listing only the
important details
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-08-03 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]