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 * @since 2.0 037 * @param <T> the type of the result of all set methods for method chaining 038 */ 039public interface PropertiesBuilderProperties<T> 040{ 041 /** 042 * Sets a flag whether include files are supported by the properties 043 * configuration object. If set to <b>true</b>, files listed by an include 044 * property are loaded automatically. 045 * 046 * @param f the value of the flag 047 * @return a reference to this object for method chaining 048 */ 049 T setIncludesAllowed(boolean f); 050 051 /** 052 * Sets the layout object for the properties configuration object. With this 053 * method a custom layout object can be set. If no layout is provided, the 054 * configuration will use a default layout. 055 * 056 * @param layout the {@code PropertiesConfigurationLayout} object to be used 057 * by the configuration 058 * @return a reference to this object for method chaining 059 */ 060 T setLayout(PropertiesConfigurationLayout layout); 061 062 /** 063 * Sets the {@code IOFactory} to be used by the properties configuration 064 * object. With this method a custom factory for input and output streams 065 * can be set. This allows customizing the format of properties read or 066 * written by the configuration. If no {@code IOFactory} is provided, the 067 * configuration uses a default one. 068 * 069 * @param factory the {@code IOFactory} to be used by the configuration 070 * @return a reference to this object for method chaining 071 */ 072 T setIOFactory(IOFactory factory); 073}