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 *     http://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;
018
019import org.apache.commons.configuration2.PropertiesConfiguration.IOFactory;
020import org.apache.commons.configuration2.PropertiesConfigurationLayout;
021
022/**
023 * <p>
024 * Definition of a parameters interface for properties configurations.
025 * </p>
026 * <p>
027 * This interface defines additional properties which can be set when
028 * initializing a {@code PropertiesConfiguration} object.
029 * </p>
030 * <p>
031 * <strong>Important note:</strong> This interface is not intended to be
032 * implemented by client code! It defines a set of available properties and may
033 * be extended even in minor releases.
034 * </p>
035 *
036 * @version $Id: PropertiesBuilderProperties.java 1624757 2014-09-13 15:47:43Z oheger $
037 * @since 2.0
038 * @param <T> the type of the result of all set methods for method chaining
039 */
040public interface PropertiesBuilderProperties<T>
041{
042    /**
043     * Sets a flag whether include files are supported by the properties
044     * configuration object. If set to <b>true</b>, files listed by an include
045     * property are loaded automatically.
046     *
047     * @param f the value of the flag
048     * @return a reference to this object for method chaining
049     */
050    T setIncludesAllowed(boolean f);
051
052    /**
053     * Sets the layout object for the properties configuration object. With this
054     * method a custom layout object can be set. If no layout is provided, the
055     * configuration will use a default layout.
056     *
057     * @param layout the {@code PropertiesConfigurationLayout} object to be used
058     *        by the configuration
059     * @return a reference to this object for method chaining
060     */
061    T setLayout(PropertiesConfigurationLayout layout);
062
063    /**
064     * Sets the {@code IOFactory} to be used by the properties configuration
065     * object. With this method a custom factory for input and output streams
066     * can be set. This allows customizing the format of properties read or
067     * written by the configuration. If no {@code IOFactory} is provided, the
068     * configuration uses a default one.
069     *
070     * @param factory the {@code IOFactory} to be used by the configuration
071     * @return a reference to this object for method chaining
072     */
073    T setIOFactory(IOFactory factory);
074}