1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.settings.building;
20
21 import java.io.File;
22 import java.util.Properties;
23
24
25
26
27
28
29 public class DefaultSettingsBuildingRequest implements SettingsBuildingRequest {
30
31 private File globalSettingsFile;
32
33 private File projectSettingsFile;
34
35 private File userSettingsFile;
36
37 private SettingsSource globalSettingsSource;
38
39 private SettingsSource projectSettingsSource;
40
41 private SettingsSource userSettingsSource;
42
43 private Properties systemProperties;
44
45 private Properties userProperties;
46
47 @Override
48 public File getGlobalSettingsFile() {
49 return globalSettingsFile;
50 }
51
52 @Override
53 public DefaultSettingsBuildingRequest setGlobalSettingsFile(File globalSettingsFile) {
54 this.globalSettingsFile = globalSettingsFile;
55
56 return this;
57 }
58
59 @Override
60 public SettingsSource getGlobalSettingsSource() {
61 return globalSettingsSource;
62 }
63
64 @Override
65 public DefaultSettingsBuildingRequest setGlobalSettingsSource(SettingsSource globalSettingsSource) {
66 this.globalSettingsSource = globalSettingsSource;
67
68 return this;
69 }
70
71 @Override
72 public File getProjectSettingsFile() {
73 return projectSettingsFile;
74 }
75
76 @Override
77 public DefaultSettingsBuildingRequest setProjectSettingsFile(File projectSettingsFile) {
78 this.projectSettingsFile = projectSettingsFile;
79
80 return this;
81 }
82
83 @Override
84 public SettingsSource getProjectSettingsSource() {
85 return projectSettingsSource;
86 }
87
88 @Override
89 public DefaultSettingsBuildingRequest setProjectSettingsSource(SettingsSource projectSettingsSource) {
90 this.projectSettingsSource = projectSettingsSource;
91
92 return this;
93 }
94
95 @Override
96 public File getUserSettingsFile() {
97 return userSettingsFile;
98 }
99
100 @Override
101 public DefaultSettingsBuildingRequest setUserSettingsFile(File userSettingsFile) {
102 this.userSettingsFile = userSettingsFile;
103
104 return this;
105 }
106
107 @Override
108 public SettingsSource getUserSettingsSource() {
109 return userSettingsSource;
110 }
111
112 @Override
113 public DefaultSettingsBuildingRequest setUserSettingsSource(SettingsSource userSettingsSource) {
114 this.userSettingsSource = userSettingsSource;
115
116 return this;
117 }
118
119 @Override
120 public Properties getSystemProperties() {
121 if (systemProperties == null) {
122 systemProperties = new Properties();
123 }
124
125 return systemProperties;
126 }
127
128 @Override
129 public DefaultSettingsBuildingRequest setSystemProperties(Properties systemProperties) {
130 if (systemProperties != null) {
131 this.systemProperties = new Properties();
132 synchronized (systemProperties) {
133
134 this.systemProperties.putAll(systemProperties);
135 }
136 } else {
137 this.systemProperties = null;
138 }
139
140 return this;
141 }
142
143 @Override
144 public Properties getUserProperties() {
145 if (userProperties == null) {
146 userProperties = new Properties();
147 }
148
149 return userProperties;
150 }
151
152 @Override
153 public DefaultSettingsBuildingRequest setUserProperties(Properties userProperties) {
154 if (userProperties != null) {
155 this.userProperties = new Properties();
156 this.userProperties.putAll(userProperties);
157 } else {
158 this.userProperties = null;
159 }
160
161 return this;
162 }
163 }