Package com.helger.config
Interface IConfig
- All Superinterfaces:
com.helger.typeconvert.trait.IGetterByKeyTrait<String>
- All Known Subinterfaces:
IConfigWithFallback
- All Known Implementing Classes:
Config,ConfigWithFallback
Read-only configuration
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionvoidEnumerate all contained configuration value provider.getConfiguredValue(String sKey) Get the configured value, which is the combination of the matching configuration source and the value, for the provided key.default intCount all configuration sources that implementIConfigurationSourceResourcedefault com.helger.base.state.ESuccessReload the configuration from all resource based sources (the ones implementingIConfigurationSourceResource).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
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:
nullif 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 benull.
-
getResourceBasedConfigurationValueProviderCount
@Nonnegative default int getResourceBasedConfigurationValueProviderCount()Count all configuration sources that implementIConfigurationSourceResource- 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 implementingIConfigurationSourceResource).- Returns:
ESuccess.SUCCESSif all could be reloaded,ESuccess.FAILUREif at least one failed.- Since:
- 9.4.8
-