Class ClowderConfigSource
- java.lang.Object
-
- com.redhat.cloud.common.clowder.configsource.ClowderConfigSource
-
- All Implemented Interfaces:
org.eclipse.microprofile.config.spi.ConfigSource
public class ClowderConfigSource extends Object implements org.eclipse.microprofile.config.spi.ConfigSource
A Config source that is using the ClowderAppConfig
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLOWDER_CONFIG_SOURCEstatic StringKAFKA_SASL_MECHANISMstatic StringKAFKA_SASL_SECURITY_PROTOCOL
-
Constructor Summary
Constructors Constructor Description ClowderConfigSource(String configFile, Map<String,io.smallrye.config.ConfigValue> exProp)Constructor for ClowderConfigSource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()intgetOrdinal()Map<String,String>getProperties()Set<String>getPropertyNames()StringgetValue(String configKey)Return a value for a config property.
-
-
-
Field Detail
-
CLOWDER_CONFIG_SOURCE
public static final String CLOWDER_CONFIG_SOURCE
- See Also:
- Constant Field Values
-
KAFKA_SASL_MECHANISM
public static final String KAFKA_SASL_MECHANISM
- See Also:
- Constant Field Values
-
KAFKA_SASL_SECURITY_PROTOCOL
public static final String KAFKA_SASL_SECURITY_PROTOCOL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClowderConfigSource
public ClowderConfigSource(String configFile, Map<String,io.smallrye.config.ConfigValue> exProp)
Constructor for ClowderConfigSource.
- Parameters:
configFile- Name/Path of a file to read the config from.exProp-Mapcontaining the existing properties from e.g. application.properties.
-
-
Method Detail
-
getProperties
public Map<String,String> getProperties()
- Specified by:
getPropertiesin interfaceorg.eclipse.microprofile.config.spi.ConfigSource
-
getPropertyNames
public Set<String> getPropertyNames()
- Specified by:
getPropertyNamesin interfaceorg.eclipse.microprofile.config.spi.ConfigSource
-
getOrdinal
public int getOrdinal()
- Specified by:
getOrdinalin interfaceorg.eclipse.microprofile.config.spi.ConfigSource
-
getValue
public String getValue(String configKey)
Return a value for a config property. We need to look at the clowder provided data and eventually replace the requested values from application.properties with what clowder provides us, which may be different. If the configfile was bad, we return the existing values.- Specified by:
getValuein interfaceorg.eclipse.microprofile.config.spi.ConfigSource
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.eclipse.microprofile.config.spi.ConfigSource
-
-