Package io.strimzi.kafka.oauth.common
Class ConfigProperties
java.lang.Object
io.strimzi.kafka.oauth.common.ConfigProperties
A helper class to apply configuration override mechanism to a
java.util.Properties object.
See Config.getValue(String, String).-
Constructor Summary
ConstructorsConstructorDescriptionConfigProperties(Properties defaults) Construct a new instance for existingjava.util.Propertiesobject -
Method Summary
Modifier and TypeMethodDescriptionstatic Propertiesresolve(Properties defaults) Apply the config override mechanism to all the keys injava.util.Propertiesobject passed as defaults, storing the resolved configuration values into a newjava.util.Propertiesobject that is returned as a result.static voidresolveAndExportToSystemProperties(Properties defaults) Apply the config override mechanism to all the keys in the passedjava.util.Propertiesobject using it as the final fallback for value resolution.resolveTo(Properties destination) Apply the config override mechanism to all the keys injava.util.Propertiesobject used to initialise thisConfigPropertiesstoring the resolved configuration values to the passed destination object.
-
Constructor Details
-
ConfigProperties
Construct a new instance for existingjava.util.Propertiesobject- Parameters:
defaults- Ajava.util.Propertiesobject that serves as the source of keys, and the final fallback source for values if no override is found for a config option
-
-
Method Details
-
resolveTo
Apply the config override mechanism to all the keys injava.util.Propertiesobject used to initialise thisConfigPropertiesstoring the resolved configuration values to the passed destination object.- Parameters:
destination- The destinationjava.util.Propertiesobject- Returns:
- The passed destination object
-
resolveAndExportToSystemProperties
Apply the config override mechanism to all the keys in the passedjava.util.Propertiesobject using it as the final fallback for value resolution. The resolved config values are set as System properties.- Parameters:
defaults- Ajava.util.Propertiesobject that serves as the source of keys, and the final fallback source for values if no override is found for a config option
-
resolve
Apply the config override mechanism to all the keys injava.util.Propertiesobject passed as defaults, storing the resolved configuration values into a newjava.util.Propertiesobject that is returned as a result.- Parameters:
defaults- Ajava.util.Propertiesobject that serves as the source of keys, and the final fallback source for values if no override is found for a config option- Returns:
- New
java.util.Propertiesobject with resolved configuration values
-