1 | |
package org.kuali.spring.util; |
2 | |
|
3 | |
import java.util.Properties; |
4 | |
|
5 | |
public class PropertiesMergeContext { |
6 | |
public static final boolean DEFAULT_IS_SORT = true; |
7 | |
public static final boolean DEFAULT_IS_OVERRIDE = true; |
8 | 5 | boolean override = DEFAULT_IS_OVERRIDE; |
9 | 5 | boolean sort = DEFAULT_IS_SORT; |
10 | |
Properties currentProperties; |
11 | |
Properties newProperties; |
12 | |
PropertySource source; |
13 | |
|
14 | |
public PropertiesMergeContext() { |
15 | 0 | this(null, null, DEFAULT_IS_OVERRIDE, null, DEFAULT_IS_SORT); |
16 | 0 | } |
17 | |
|
18 | |
public PropertiesMergeContext(Properties currentProperties, Properties newProperties, PropertySource source) { |
19 | 1 | this(currentProperties, newProperties, DEFAULT_IS_OVERRIDE, source, DEFAULT_IS_SORT); |
20 | 1 | } |
21 | |
|
22 | |
public PropertiesMergeContext(Properties currentProperties, Properties newProperties, boolean override, |
23 | |
PropertySource source) { |
24 | 4 | this(currentProperties, newProperties, override, source, DEFAULT_IS_SORT); |
25 | 4 | } |
26 | |
|
27 | |
public PropertiesMergeContext(Properties currentProperties, Properties newProperties, boolean override, |
28 | |
PropertySource source, boolean sort) { |
29 | 5 | super(); |
30 | 5 | this.currentProperties = currentProperties; |
31 | 5 | this.newProperties = newProperties; |
32 | 5 | this.override = override; |
33 | 5 | this.source = source; |
34 | 5 | this.sort = sort; |
35 | 5 | } |
36 | |
|
37 | |
public Properties getCurrentProperties() { |
38 | 136 | return currentProperties; |
39 | |
} |
40 | |
|
41 | |
public void setCurrentProperties(Properties currentProperties) { |
42 | 0 | this.currentProperties = currentProperties; |
43 | 0 | } |
44 | |
|
45 | |
public Properties getNewProperties() { |
46 | 141 | return newProperties; |
47 | |
} |
48 | |
|
49 | |
public void setNewProperties(Properties newProperties) { |
50 | 0 | this.newProperties = newProperties; |
51 | 0 | } |
52 | |
|
53 | |
public boolean isOverride() { |
54 | 136 | return override; |
55 | |
} |
56 | |
|
57 | |
public void setOverride(boolean override) { |
58 | 0 | this.override = override; |
59 | 0 | } |
60 | |
|
61 | |
public boolean isSort() { |
62 | 5 | return sort; |
63 | |
} |
64 | |
|
65 | |
public void setSort(boolean sort) { |
66 | 0 | this.sort = sort; |
67 | 0 | } |
68 | |
|
69 | |
public PropertySource getSource() { |
70 | 136 | return source; |
71 | |
} |
72 | |
|
73 | |
public void setSource(PropertySource source) { |
74 | 0 | this.source = source; |
75 | 0 | } |
76 | |
} |