T
- the return type of all methods for allowing method chainingpublic interface CombinedBuilderProperties<T>
Definition of a properties interface for the parameters of a combined configuration builder.
This interface defines a number of properties for adapting the construction of a combined configuration based on a definition configuration. Properties can be set in a fluent style.
Important note: This interface is not intended to be implemented by client code! It defines a set of available properties and may be extended even in minor releases.
Modifier and Type | Method and Description |
---|---|
<D> T |
registerChildDefaultsHandler(Class<D> paramClass,
DefaultParametersHandler<? super D> handler)
Registers a
DefaultParametersHandler for child configuration sources. |
<D> T |
registerChildDefaultsHandler(Class<D> paramClass,
DefaultParametersHandler<? super D> handler,
Class<?> startClass)
Registers a
DefaultParametersHandler for child configuration sources
derived from the given start class. |
T |
registerProvider(String tagName,
ConfigurationBuilderProvider provider)
Registers the given
ConfigurationBuilderProvider for the
specified tag name. |
T |
setBasePath(String path)
Sets the base path for this combined configuration builder.
|
T |
setChildDefaultParametersManager(DefaultParametersManager manager)
Sets a
DefaultParametersManager object responsible for managing the default
parameter handlers to be applied on child configuration sources. |
T |
setDefinitionBuilder(ConfigurationBuilder<? extends HierarchicalConfiguration<?>> builder)
Sets the
ConfigurationBuilder for the definition configuration. |
T |
setDefinitionBuilderParameters(BuilderParameters params)
Sets the parameters object for the definition configuration builder.
|
T |
setInheritSettings(boolean f)
Sets a flag whether the child configurations created by a
CombinedConfigurationBuilder should inherit the settings defined
for the builder. |
T setInheritSettings(boolean f)
CombinedConfigurationBuilder
should inherit the settings defined
for the builder. This is typically useful because for configurations
coming from homogeneous sources often similar conventions are used.
Therefore, this flag is true per default.f
- the flag whether settings should be inherited by child
configurationsT setDefinitionBuilder(ConfigurationBuilder<? extends HierarchicalConfiguration<?>> builder)
ConfigurationBuilder
for the definition configuration.
This is the configuration which contains the configuration sources that
form the combined configuration.builder
- the definition ConfigurationBuilder
T registerProvider(String tagName, ConfigurationBuilderProvider provider)
ConfigurationBuilderProvider
for the
specified tag name. This means that whenever this tag is encountered in a
configuration definition file, the corresponding builder provider is
invoked.tagName
- the name of the tag (must not be null)provider
- the ConfigurationBuilderProvider
(must not be
null)IllegalArgumentException
- if a required parameter is missingT setBasePath(String path)
path
- the base path for resolving relative file namesT setDefinitionBuilderParameters(BuilderParameters params)
setDefinitionBuilder(ConfigurationBuilder)
method). In this
case, a builder for an XML configuration is created and configured with
this parameters object.params
- the parameters object for the definition configuration
builderT setChildDefaultParametersManager(DefaultParametersManager manager)
DefaultParametersManager
object responsible for managing the default
parameter handlers to be applied on child configuration sources. When creating
builders for child configuration sources their parameters are initialized using
this DefaultParametersManager
instance. This way, meaningful defaults can
be set. Note that calling this method overrides all
DefaultParametersHandler
objects previously set by one of the
registerChildDefaultsHandler()
methods! So either use this method if a
pre-configured manager object is to be set or call the
registerChildDefaultHandler()
methods with the handlers to be registered
(in the latter case, it is not necessary to set a DefaultParametersManager
explicitly; a default one is created behind the scenes).manager
- the DefaultParametersManager
<D> T registerChildDefaultsHandler(Class<D> paramClass, DefaultParametersHandler<? super D> handler)
DefaultParametersHandler
for child configuration sources. With
this method an arbitrary number of handler objects can be set. When creating
builders for child configuration sources their parameters are initialized by
invoking all matching DefaultParametersHandler
s on them. So, basically the
same mechanism is used for the initialization of parameters for child configuration
sources as for normal parameter objects.D
- the type of the handler to be registeredparamClass
- the parameter class supported by the handlerhandler
- the DefaultParametersHandler
to be registeredDefaultParametersManager.registerDefaultsHandler(Class,
DefaultParametersHandler)
<D> T registerChildDefaultsHandler(Class<D> paramClass, DefaultParametersHandler<? super D> handler, Class<?> startClass)
DefaultParametersHandler
for child configuration sources
derived from the given start class. This method works like the overloaded variant,
but limits the application of the defaults handler to specific child configuration
sources.D
- the type of the handler to be registeredparamClass
- the parameter class supported by the handlerhandler
- the DefaultParametersHandler
to be registeredstartClass
- an optional start class in the hierarchy of parameter objects for
which this handler should be appliedDefaultParametersManager.registerDefaultsHandler(Class,
DefaultParametersHandler, Class)
Copyright © 2001–2020 The Apache Software Foundation. All rights reserved.