Package io.smallrye.config
Class SmallRyeConfigBuilder
java.lang.Object
io.smallrye.config.SmallRyeConfigBuilder
- All Implemented Interfaces:
org.eclipse.microprofile.config.spi.ConfigBuilder
public class SmallRyeConfigBuilder
extends Object
implements org.eclipse.microprofile.config.spi.ConfigBuilder
- Author:
- Jeff Mesnil (c) 2017 Red Hat inc.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()forClassLoader(ClassLoader classLoader) protected List<org.eclipse.microprofile.config.spi.ConfigSource> List<io.smallrye.config.SmallRyeConfigBuilder.InterceptorWithPriority> protected List<org.eclipse.microprofile.config.spi.ConfigSource> List<org.eclipse.microprofile.config.spi.ConfigSourceProvider> List<org.eclipse.microprofile.config.spi.ConfigSource> protected List<org.eclipse.microprofile.config.spi.ConfigSource> booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleansetAddDefaultInterceptors(boolean addDefaultInterceptors) setAddDefaultSources(boolean addDefaultSources) setAddDiscoveredConverters(boolean addDiscoveredConverters) setAddDiscoveredInterceptors(boolean addDiscoveredInterceptors) setAddDiscoveredSecretKeysHandlers(boolean addDiscoveredSecretKeysHandlers) setAddDiscoveredSources(boolean addDiscoveredSources) setAddDiscoveredValidator(boolean addDiscoveredValidator) setAddPropertiesSources(boolean addPropertiesSources) setAddSystemSources(boolean addSystemSources) setCachePropertyNames(boolean cachePropertyNames) withConverter(Class<T> type, int priority, org.eclipse.microprofile.config.spi.Converter<T> converter) withConverters(org.eclipse.microprofile.config.spi.Converter<?>[] converters) withCustomizers(SmallRyeConfigBuilderCustomizer... customizers) withDefaultValue(String name, String value) withDefaultValues(Map<String, String> defaultValues) withInterceptorFactories(ConfigSourceInterceptorFactory... interceptorFactories) withInterceptors(ConfigSourceInterceptor... interceptors) withMapping(ConfigMappings.ConfigClass configClass) withMapping(Class<?> klass) withMapping(Class<?> klass, String prefix) withMappingIgnore(String path) Ignores a specified path segment when performing a Config Mapping.withProfile(String profile) withProfiles(List<String> profiles) withSecretKeyHandlerFactories(SecretKeysHandlerFactory... secretKeyHandlerFactories) withSecretKeys(String... keys) withSecretKeysHandlers(SecretKeysHandler... secretKeysHandlers) withSources(ConfigSourceFactory... configSourceFactories) withSources(Collection<org.eclipse.microprofile.config.spi.ConfigSource> configSources) withSources(org.eclipse.microprofile.config.spi.ConfigSource... configSources) withSources(org.eclipse.microprofile.config.spi.ConfigSourceProvider provider) withValidateUnknown(boolean validateUnknown) Enable or disable the Config Mapping requirement to match every configuration path available in the Config system.withValidator(ConfigValidator validator)
-
Constructor Details
-
SmallRyeConfigBuilder
public SmallRyeConfigBuilder()
-
-
Method Details
-
addDiscoveredCustomizers
-
addDiscoveredSources
- Specified by:
addDiscoveredSourcesin interfaceorg.eclipse.microprofile.config.spi.ConfigBuilder
-
addDiscoveredConverters
- Specified by:
addDiscoveredConvertersin interfaceorg.eclipse.microprofile.config.spi.ConfigBuilder
-
addDiscoveredInterceptors
-
addDiscoveredSecretKeysHandlers
-
addDiscoveredValidator
-
addDefaultSources
- Specified by:
addDefaultSourcesin interfaceorg.eclipse.microprofile.config.spi.ConfigBuilder
-
addSystemSources
-
addPropertiesSources
-
getDefaultSources
-
getSystemSources
-
getPropertiesSources
-
addDefaultInterceptors
-
forClassLoader
- Specified by:
forClassLoaderin interfaceorg.eclipse.microprofile.config.spi.ConfigBuilder
-
withCustomizers
-
withSources
public SmallRyeConfigBuilder withSources(org.eclipse.microprofile.config.spi.ConfigSource... configSources) - Specified by:
withSourcesin interfaceorg.eclipse.microprofile.config.spi.ConfigBuilder
-
withSources
public SmallRyeConfigBuilder withSources(Collection<org.eclipse.microprofile.config.spi.ConfigSource> configSources) -
withSources
public SmallRyeConfigBuilder withSources(org.eclipse.microprofile.config.spi.ConfigSourceProvider provider) -
withSources
-
withInterceptors
-
withInterceptorFactories
public SmallRyeConfigBuilder withInterceptorFactories(ConfigSourceInterceptorFactory... interceptorFactories) -
withSecretKeysHandlers
-
withSecretKeyHandlerFactories
public SmallRyeConfigBuilder withSecretKeyHandlerFactories(SecretKeysHandlerFactory... secretKeyHandlerFactories) -
withProfile
-
withProfiles
-
withSecretKeys
-
withDefaultValue
-
withDefaultValues
-
withMapping
-
withMapping
-
withMapping
-
withMappingIgnore
Ignores a specified path segment when performing a Config Mapping.By default, a Config Mapping must match every configuration path available in the Config system. However, such conditions may not always be possible, and in that case, the specified path is ignored.
Examples of paths and ignores:
foo.bar- ignores the configuration namefoo.barfoo.*- ignores the single configurations names underfoofoo.**- ignores all the configurations names underfoo
- Parameters:
path- the configuration path to ignore- Returns:
- this
SmallRyeConfigBuilder - See Also:
-
withValidateUnknown
Enable or disable the Config Mapping requirement to match every configuration path available in the Config system. By default, the validation is enabled.- Parameters:
validateUnknown- a booleantrueto enable the validation, orfalseto disable it.- Returns:
- this
SmallRyeConfigBuilder - See Also:
-
withValidator
-
withConverters
public SmallRyeConfigBuilder withConverters(org.eclipse.microprofile.config.spi.Converter<?>[] converters) - Specified by:
withConvertersin interfaceorg.eclipse.microprofile.config.spi.ConfigBuilder
-
withConverter
public <T> SmallRyeConfigBuilder withConverter(Class<T> type, int priority, org.eclipse.microprofile.config.spi.Converter<T> converter) - Specified by:
withConverterin interfaceorg.eclipse.microprofile.config.spi.ConfigBuilder
-
getSources
-
getSourceProviders
-
getConverters
-
getInterceptors
-
getProfiles
-
getValidator
-
getDefaultValues
-
getSecretKeys
-
getMappingsBuilder
-
getClassLoader
-
isAddDiscoveredCustomizers
public boolean isAddDiscoveredCustomizers() -
isAddDefaultSources
public boolean isAddDefaultSources() -
isAddSystemSources
public boolean isAddSystemSources() -
isAddPropertiesSources
public boolean isAddPropertiesSources() -
isAddDefaultInterceptors
public boolean isAddDefaultInterceptors() -
isAddDiscoveredSources
public boolean isAddDiscoveredSources() -
isAddDiscoveredConverters
public boolean isAddDiscoveredConverters() -
isAddDiscoveredInterceptors
public boolean isAddDiscoveredInterceptors() -
isAddDiscoveredSecretKeysHandlers
public boolean isAddDiscoveredSecretKeysHandlers() -
isAddDiscoveredValidator
public boolean isAddDiscoveredValidator() -
isCachePropertyNames
public boolean isCachePropertyNames() -
setAddDefaultSources
-
setAddSystemSources
-
setAddPropertiesSources
-
setAddDefaultInterceptors
-
setAddDiscoveredSources
-
setAddDiscoveredConverters
-
setAddDiscoveredInterceptors
-
setAddDiscoveredSecretKeysHandlers
public SmallRyeConfigBuilder setAddDiscoveredSecretKeysHandlers(boolean addDiscoveredSecretKeysHandlers) -
setAddDiscoveredValidator
-
setCachePropertyNames
-
build
- Specified by:
buildin interfaceorg.eclipse.microprofile.config.spi.ConfigBuilder
-