1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.property;
17
18 import java.util.List;
19 import java.util.Properties;
20
21 import org.kuali.common.util.Encodings;
22 import org.kuali.common.util.Mode;
23 import org.springframework.util.PropertyPlaceholderHelper;
24
25 public class PropertiesContext {
26
27 protected PropertyPlaceholderHelper helper = Constants.DEFAULT_PROPERTY_PLACEHOLDER_HELPER;
28 protected String encoding = Encodings.UTF8;
29 protected Mode missingLocationsMode = Mode.ERROR;
30 protected Properties properties;
31 protected List<String> locations;
32
33 public PropertiesContext() {
34 this((Properties) null);
35 }
36
37 public PropertiesContext(Properties properties) {
38 super();
39 this.properties = properties;
40 }
41
42 public PropertiesContext(List<String> locations) {
43 this(locations, Encodings.UTF8);
44 }
45
46 public PropertiesContext(List<String> locations, String encoding) {
47 super();
48 this.encoding = encoding;
49 this.locations = locations;
50 }
51
52 public PropertyPlaceholderHelper getHelper() {
53 return helper;
54 }
55
56 public void setHelper(PropertyPlaceholderHelper helper) {
57 this.helper = helper;
58 }
59
60 public String getEncoding() {
61 return encoding;
62 }
63
64 public void setEncoding(String encoding) {
65 this.encoding = encoding;
66 }
67
68 public Properties getProperties() {
69 return properties;
70 }
71
72 public void setProperties(Properties properties) {
73 this.properties = properties;
74 }
75
76 public List<String> getLocations() {
77 return locations;
78 }
79
80 public void setLocations(List<String> locations) {
81 this.locations = locations;
82 }
83
84 public Mode getMissingLocationsMode() {
85 return missingLocationsMode;
86 }
87
88 public void setMissingLocationsMode(Mode missingLocationsMode) {
89 this.missingLocationsMode = missingLocationsMode;
90 }
91 }