public interface ConfigurationContextBuilder
ConfigurationContext
.
Builders can be obtained in exactly two ways:
ConfigurationContext
,
by calling ConfigurationContext.toBuilder()
.ConfigurationProvider.getConfigurationContextBuilder()
.ConfigurationContext
instance can
be created and can be applied by calling
ConfigurationProvider.setConfigurationContext(ConfigurationContext)
. Since this method can
throw an UnsupportedOperationException, you should check before if changing the current ConfigurationContext
programmatically is supported by calling
org.apache.tamaya.ConfigurationProvider#isConfigurationContextSettable()
.ConfigurationContextBuilder setContext(ConfigurationContext context)
ConfigurationContext
instance. This
method will replace any existing data in the current builder with the data contained in the given
ConfigurationContext
.context
- the ConfigurationContext
instance to be used, not null.default ConfigurationContextBuilder addPropertySources(PropertySource... propertySourcesToAdd)
PropertySource
s.
It is not needed for normal 'usage' by end users, but only for Extension Developers!propertySourcesToAdd
- the PropertySources to addConfigurationContextBuilder addPropertySources(Collection<PropertySource> propertySourcesToAdd)
PropertySource
s.
It is not needed for normal 'usage' by end users, but only for Extension Developers!propertySourcesToAdd
- the PropertySources to adddefault ConfigurationContextBuilder removePropertySources(String... propertySourcesNames)
PropertySource
s.
It is not needed for normal 'usage' by end users, but only for Extension Developers!propertySourcesNames
- the PropertySource names of the sources to removeConfigurationContextBuilder removePropertySources(Collection<String> propertySourcesNames)
PropertySource
s.
It is not needed for normal 'usage' by end users, but only for Extension Developers!propertySourcesNames
- the PropertySource names of the sources to removedefault ConfigurationContextBuilder addPropertyFilters(PropertyFilter... filters)
filters
- the filters to addConfigurationContextBuilder addPropertyFilters(Collection<PropertyFilter> filters)
filters
- the filters to adddefault ConfigurationContextBuilder removePropertyFilters(PropertyFilter... filters)
filters
- the filters to removeConfigurationContextBuilder removePropertyFilters(java.util.function.Predicate<PropertyFilter> selector)
selector
- the selector query, not null.ConfigurationContextBuilder removePropertyFilters(Collection<PropertyFilter> filters)
filters
- the filters to removeConfigurationContextBuilder removePropertySources(java.util.function.Predicate<PropertySource> selector)
selector
- the selector query, not null.<T> ConfigurationContextBuilder addPropertyConverter(TypeLiteral<T> typeToConvert, PropertyConverter<T> propertyConverter)
PropertyConverter
s.
It is not needed for normal 'usage' by end users, but only for Extension Developers!typeToConvert
- the type which the converter is forpropertyConverter
- the PropertyConverters to add for this typeConfigurationContextBuilder removePropertyConverters(TypeLiteral<?> typeToConvert, PropertyConverter<?>... converters)
typeToConvert
- the type which the converter is forconverters
- the converters to removeConfigurationContextBuilder removePropertyConverters(TypeLiteral<?> typeToConvert, Collection<PropertyConverter<?>> converters)
typeToConvert
- the type which the converter is forconverters
- the converters to removeConfigurationContextBuilder setPropertyValueCombinationPolicy(PropertyValueCombinationPolicy policy)
PropertyValueCombinationPolicy
used to evaluate the final
property values.policy
- the PropertyValueCombinationPolicy
used, not nullConfigurationContext build()
ConfigurationContext
based on the data set.Copyright © 2014–2015 Apache Software Foundation. All rights reserved.