1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.service;
17
18 import java.util.List;
19
20 import org.kuali.common.util.spring.SpringUtils;
21 import org.springframework.core.env.PropertySource;
22
23 @Deprecated
24 public class PropertySourceContext {
25
26 public static final boolean DEFAULT_REMOVE_EXISTING_SOURCES = false;
27 public static final boolean DEFAULT_LAST_ONE_IN_WINS = true;
28 public static final PropertySourceAddPriority DEFAULT_PRIORITY = PropertySourceAddPriority.LAST;
29
30
31 boolean removeExistingSources = DEFAULT_REMOVE_EXISTING_SOURCES;
32
33
34
35 boolean lastOneInWins = DEFAULT_LAST_ONE_IN_WINS;
36
37
38 PropertySourceAddPriority priority = DEFAULT_PRIORITY;
39
40
41 List<PropertySource<?>> sources;
42
43 public PropertySourceContext() {
44 this(null);
45 }
46
47 public PropertySourceContext(List<PropertySource<?>> sources) {
48 this(sources, DEFAULT_REMOVE_EXISTING_SOURCES);
49 }
50
51 public PropertySourceContext(PropertySource<?> source, boolean removeExistingSources) {
52 this(SpringUtils.asList(source), removeExistingSources);
53 }
54
55 public PropertySourceContext(List<PropertySource<?>> sources, boolean removeExistingSources) {
56 super();
57 this.sources = sources;
58 this.removeExistingSources = removeExistingSources;
59 }
60
61 public boolean isRemoveExistingSources() {
62 return removeExistingSources;
63 }
64
65 public void setRemoveExistingSources(boolean removeExistingSources) {
66 this.removeExistingSources = removeExistingSources;
67 }
68
69 public boolean isLastOneInWins() {
70 return lastOneInWins;
71 }
72
73 public void setLastOneInWins(boolean lastOneInWins) {
74 this.lastOneInWins = lastOneInWins;
75 }
76
77 public List<PropertySource<?>> getSources() {
78 return sources;
79 }
80
81 public void setSources(List<PropertySource<?>> sources) {
82 this.sources = sources;
83 }
84
85 public PropertySourceAddPriority getPriority() {
86 return priority;
87 }
88
89 public void setPriority(PropertySourceAddPriority priority) {
90 this.priority = priority;
91 }
92
93 }