View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.commons.configuration2.builder.combined;
18  
19  import org.apache.commons.configuration2.builder.BuilderParameters;
20  
21  /**
22   * <p>
23   * Definition of a properties interface for the parameters of a multiple file configuration builder.
24   * </p>
25   * <p>
26   * This interface defines a number of properties for configuring a builder managing multiple file-based configurations
27   * which are selected by a pattern. Properties can be set in a fluent style.
28   * </p>
29   * <p>
30   * <strong>Important note:</strong> This interface is not intended to be implemented by client code! It defines a set of
31   * available properties and may be extended even in minor releases.
32   * </p>
33   *
34   * @since 2.0
35   * @param <T> the return type of all methods for allowing method chaining
36   */
37  public interface MultiFileBuilderProperties<T> {
38      /**
39       * Sets the pattern string. Based on this pattern the configuration file to be loaded is determined.
40       *
41       * @param p the pattern string
42       * @return a reference to this object for method chaining
43       */
44      T setFilePattern(String p);
45  
46      /**
47       * Sets a parameters object to be used when creating a managed configuration. These parameters configure sub
48       * configurations.
49       *
50       * @param p the parameters object for a sub configuration
51       * @return a reference to this object for method chaining
52       */
53      T setManagedBuilderParameters(BuilderParameters p);
54  }