1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.rice.core.config; |
18 | |
|
19 | |
import java.util.ArrayList; |
20 | |
import java.util.HashMap; |
21 | |
import java.util.List; |
22 | |
import java.util.Map; |
23 | |
import java.util.Properties; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
public class SimpleConfig extends BaseConfig { |
32 | |
|
33 | |
private Properties baseProperties; |
34 | |
private Map<String, Object> baseObjects; |
35 | |
|
36 | |
public SimpleConfig() { |
37 | 0 | super(new ArrayList<String>()); |
38 | 0 | } |
39 | |
|
40 | |
public SimpleConfig(Properties properties) { |
41 | 0 | super(new ArrayList<String>()); |
42 | 0 | this.baseProperties = properties; |
43 | 0 | } |
44 | |
|
45 | |
public SimpleConfig(List<String> fileLocs, Properties baseProperties) { |
46 | 0 | super(fileLocs); |
47 | 0 | this.baseProperties = baseProperties; |
48 | 0 | } |
49 | |
|
50 | |
public SimpleConfig(List<String> fileLocs) { |
51 | 0 | super(fileLocs); |
52 | 0 | } |
53 | |
|
54 | |
public SimpleConfig(String fileLoc) { |
55 | 0 | this(fileLoc, null); |
56 | 0 | } |
57 | |
|
58 | |
public SimpleConfig(String fileLoc, Properties baseProperties) { |
59 | 0 | super(fileLoc); |
60 | 0 | this.baseProperties = baseProperties; |
61 | 0 | } |
62 | |
|
63 | |
@Override |
64 | |
public Map<String, Object> getBaseObjects() { |
65 | 0 | if (this.baseObjects == null) { |
66 | 0 | this.baseObjects = new HashMap<String, Object>(); |
67 | |
} |
68 | 0 | return this.baseObjects; |
69 | |
} |
70 | |
|
71 | |
@Override |
72 | |
public Properties getBaseProperties() { |
73 | 0 | if (this.baseProperties == null) { |
74 | 0 | return new Properties(); |
75 | |
} |
76 | 0 | return this.baseProperties; |
77 | |
} |
78 | |
|
79 | |
} |