Package org.pipservices3.commons.config
Class OptionResolver
java.lang.Object
org.pipservices3.commons.config.OptionResolver
A helper class to parameters from
"options"
configuration section.
### Example ###
ConfigParams config = ConfigParams.fromTuples(
...
"options.param1", "ABC",
"options.param2", 123
);
ConfigParams options = OptionsResolver.resolve(config, false); // Result: param1=ABC;param2=123
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigParams
resolve
(ConfigParams config, boolean configAsDefault) Resolves an "options" configuration section from component configuration parameters.
-
Constructor Details
-
OptionResolver
public OptionResolver()
-
-
Method Details
-
resolve
Resolves an "options" configuration section from component configuration parameters.- Parameters:
config
- configuration parametersconfigAsDefault
- (optional) When set true the method returns the entire parameter set when "options" section is not found. Default: false- Returns:
- configuration parameters from "options" section
-