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 super(new ArrayList<String>());
38 }
39
40 public SimpleConfig(Properties properties) {
41 super(new ArrayList<String>());
42 this.baseProperties = properties;
43 }
44
45 public SimpleConfig(List<String> fileLocs, Properties baseProperties) {
46 super(fileLocs);
47 this.baseProperties = baseProperties;
48 }
49
50 public SimpleConfig(List<String> fileLocs) {
51 super(fileLocs);
52 }
53
54 public SimpleConfig(String fileLoc) {
55 this(fileLoc, null);
56 }
57
58 public SimpleConfig(String fileLoc, Properties baseProperties) {
59 super(fileLoc);
60 this.baseProperties = baseProperties;
61 }
62
63 @Override
64 public Map<String, Object> getBaseObjects() {
65 if (this.baseObjects == null) {
66 this.baseObjects = new HashMap<String, Object>();
67 }
68 return this.baseObjects;
69 }
70
71 @Override
72 public Properties getBaseProperties() {
73 if (this.baseProperties == null) {
74 return new Properties();
75 }
76 return this.baseProperties;
77 }
78
79 }