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_JAAS_CONFIG_KEYstatic StringKAFKA_SASL_MECHANISM_KEYstatic StringKAFKA_SASL_MECHANISM_VALUEstatic StringKAFKA_SECURITY_PROTOCOL_KEYstatic StringKAFKA_SECURITY_PROTOCOL_VALUEstatic StringKAFKA_SSL_TRUSTSTORE_LOCATION_KEYstatic StringKAFKA_SSL_TRUSTSTORE_TYPE_KEYstatic StringKAFKA_SSL_TRUSTSTORE_TYPE_VALUE
-
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_JAAS_CONFIG_KEY
public static final String KAFKA_SASL_JAAS_CONFIG_KEY
- See Also:
- Constant Field Values
-
KAFKA_SASL_MECHANISM_KEY
public static final String KAFKA_SASL_MECHANISM_KEY
- See Also:
- Constant Field Values
-
KAFKA_SECURITY_PROTOCOL_KEY
public static final String KAFKA_SECURITY_PROTOCOL_KEY
- See Also:
- Constant Field Values
-
KAFKA_SSL_TRUSTSTORE_LOCATION_KEY
public static final String KAFKA_SSL_TRUSTSTORE_LOCATION_KEY
- See Also:
- Constant Field Values
-
KAFKA_SSL_TRUSTSTORE_TYPE_KEY
public static final String KAFKA_SSL_TRUSTSTORE_TYPE_KEY
- See Also:
- Constant Field Values
-
KAFKA_SASL_MECHANISM_VALUE
public static final String KAFKA_SASL_MECHANISM_VALUE
- See Also:
- Constant Field Values
-
KAFKA_SECURITY_PROTOCOL_VALUE
public static final String KAFKA_SECURITY_PROTOCOL_VALUE
- See Also:
- Constant Field Values
-
KAFKA_SSL_TRUSTSTORE_TYPE_VALUE
public static final String KAFKA_SSL_TRUSTSTORE_TYPE_VALUE
- 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
-
-