1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.configuration2.builder;
18
19 import java.util.Map;
20
21 import org.apache.commons.configuration2.ConfigurationConsumer;
22 import org.apache.commons.configuration2.PropertiesConfiguration.IOFactory;
23 import org.apache.commons.configuration2.PropertiesConfigurationLayout;
24 import org.apache.commons.configuration2.ex.ConfigurationException;
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 public class PropertiesBuilderParametersImpl extends FileBasedBuilderParametersImpl implements PropertiesBuilderProperties<PropertiesBuilderParametersImpl> {
43
44 private static final String PROP_INCLUDE_LISTENER = "includeListener";
45
46
47 private static final String PROP_INCLUDES_ALLOWED = "includesAllowed";
48
49
50 private static final String PROP_LAYOUT = "layout";
51
52
53 private static final String PROP_IO_FACTORY = "IOFactory";
54
55 @Override
56 public PropertiesBuilderParametersImpl setIncludeListener(final ConfigurationConsumer<ConfigurationException> includeListener) {
57 storeProperty(PROP_INCLUDE_LISTENER, includeListener);
58 return this;
59 }
60
61 @Override
62 public PropertiesBuilderParametersImpl setIncludesAllowed(final boolean f) {
63 storeProperty(PROP_INCLUDES_ALLOWED, Boolean.valueOf(f));
64 return this;
65 }
66
67
68
69
70 @Override
71 public void inheritFrom(final Map<String, ?> source) {
72 super.inheritFrom(source);
73 copyPropertiesFrom(source, PROP_INCLUDES_ALLOWED, PROP_INCLUDE_LISTENER, PROP_IO_FACTORY);
74 }
75
76 @Override
77 public PropertiesBuilderParametersImpl setLayout(final PropertiesConfigurationLayout layout) {
78 storeProperty(PROP_LAYOUT, layout);
79 return this;
80 }
81
82 @Override
83 public PropertiesBuilderParametersImpl setIOFactory(final IOFactory factory) {
84 storeProperty(PROP_IO_FACTORY, factory);
85 return this;
86 }
87 }