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 Details

  • Constructor Details

    • 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 - Map containing the existing properties from e.g. application.properties.
  • Method Details

    • getProperties

      public Map<String,String> getProperties()
      Specified by:
      getProperties in interface org.eclipse.microprofile.config.spi.ConfigSource
    • getPropertyNames

      public Set<String> getPropertyNames()
      Specified by:
      getPropertyNames in interface org.eclipse.microprofile.config.spi.ConfigSource
    • getOrdinal

      public int getOrdinal()
      Specified by:
      getOrdinal in interface org.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:
      getValue in interface org.eclipse.microprofile.config.spi.ConfigSource
    • getName

      public String getName()
      Specified by:
      getName in interface org.eclipse.microprofile.config.spi.ConfigSource