Interface IConfig

All Superinterfaces:
com.helger.typeconvert.trait.IGetterByKeyTrait<String>
All Known Subinterfaces:
IConfigWithFallback
All Known Implementing Classes:
Config, ConfigWithFallback

public interface IConfig extends com.helger.typeconvert.trait.IGetterByKeyTrait<String>
Read-only configuration
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Enumerate all contained configuration value provider.
    Get the configured value, which is the combination of the matching configuration source and the value, for the provided key.
    default int
    Count all configuration sources that implement IConfigurationSourceResource
    default com.helger.base.state.ESuccess
    Reload the configuration from all resource based sources (the ones implementing IConfigurationSourceResource).

    Methods inherited from interface com.helger.typeconvert.trait.IGetterByKeyTrait

    containsNonNullValue, containsNullValue, getAsBigDecimal, getAsBigDecimal, getAsBigInteger, getAsBigInteger, getAsBoolean, getAsBoolean, getAsBooleanObj, getAsByte, getAsByte, getAsByteArray, getAsByteObj, getAsChar, getAsChar, getAsCharArray, getAsCharArray, getAsCharObj, getAsDouble, getAsDouble, getAsDoubleObj, getAsFloat, getAsFloat, getAsFloatObj, getAsInt, getAsInt, getAsIntObj, getAsLocalDate, getAsLocalDate, getAsLocalDateTime, getAsLocalDateTime, getAsLocalTime, getAsLocalTime, getAsLong, getAsLong, getAsLongObj, getAsShort, getAsShort, getAsShortObj, getAsSqlBlob, getAsSqlClob, getAsSqlDate, getAsSqlNClob, getAsSqlRowId, getAsSqlTime, getAsSqlTimestamp, getAsString, getAsString, getAsStringList, getAsStringList, getAsStringSet, getAsStringSet, getCastedValue, getCastedValue, getCastedValue, getCastedValue, getConvertedValue, getConvertedValue, getSafeCastedValue, getSafeCastedValue, getValue, getValueClass, hasStringValue, hasStringValue, onSafeCastError
  • Method Details

    • getConfiguredValue

      @Nullable ConfiguredValue getConfiguredValue(@Nullable String sKey)
      Get the configured value, which is the combination of the matching configuration source and the value, for the provided key.
      Parameters:
      sKey - The configuration key to look up.
      Returns:
      null if no such configuration value is available.
      Since:
      9.4.5
    • forEachConfigurationValueProvider

      void forEachConfigurationValueProvider(@Nonnull IConfigurationValueProviderWithPriorityCallback aCallback)
      Enumerate all contained configuration value provider. All items will be enumerated in the order they are checked, so the ones with highest priority first.
      Parameters:
      aCallback - The callback to invoked. May not be null.
    • getResourceBasedConfigurationValueProviderCount

      @Nonnegative default int getResourceBasedConfigurationValueProviderCount()
      Count all configuration sources that implement IConfigurationSourceResource
      Returns:
      The number of resource based configuration sources contained. Always ≥ 0.
    • reloadAllResourceBasedConfigurationValues

      @Nonnull default com.helger.base.state.ESuccess reloadAllResourceBasedConfigurationValues()
      Reload the configuration from all resource based sources (the ones implementing IConfigurationSourceResource).
      Returns:
      ESuccess.SUCCESS if all could be reloaded, ESuccess.FAILURE if at least one failed.
      Since:
      9.4.8