Source code
Description: source: package: org.apache.commons.configuration2.builder.combined, interface: ConfigurationBuilderProvider

    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one or more
    003 * contributor license agreements.  See the NOTICE file distributed with
    004 * this work for additional information regarding copyright ownership.
    005 * The ASF licenses this file to You under the Apache License, Version 2.0
    006 * (the "License"); you may not use this file except in compliance with
    007 * the License.  You may obtain a copy of the License at
    008 *
    009 *     https://www.apache.org/licenses/LICENSE-2.0
    010 *
    011 * Unless required by applicable law or agreed to in writing, software
    012 * distributed under the License is distributed on an "AS IS" BASIS,
    013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014 * See the License for the specific language governing permissions and
    015 * limitations under the License.
    016 */
    017package org.apache.commons.configuration2.builder.combined;
    018
    019import org.apache.commons.configuration2.Configuration;
    020import org.apache.commons.configuration2.builder.ConfigurationBuilder;
    021import org.apache.commons.configuration2.ex.ConfigurationException;
    022
    023/**
    024 * <p>
    025 * An interface for creating builders for configuration sources of a {@link CombinedConfigurationBuilder}.
    026 * </p>
    027 * <p>
    028 * When processing its definition file {@code CombinedConfigurationBuilder} scans for tags declaring configuration
    029 * sources and maps them to implementations of this interface. The instances are then used to obtain builder objects to
    030 * create the corresponding configuration sources. Parameters of the builders are provided as
    031 * {@link ConfigurationDeclaration} objects.
    032 * </p>
    033 *
    034 * @since 2.0
    035 */
    036public interface ConfigurationBuilderProvider {
    037
    038    /**
    039     * Gets the builder for the configuration source managed by this provider. This method is called during processing of
    040     * the combined configuration definition file.
    041     *
    042     * @param decl the bean declaration with initialization parameters for the configuration builder
    043     * @return the {@code ConfigurationBuilder} object created by this provider
    044     * @throws ConfigurationException if an error occurs
    045     */
    046    ConfigurationBuilder<? extends Configuration> getConfigurationBuilder(ConfigurationDeclaration decl) throws ConfigurationException;
    047}