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 userSettingsFile;
34
35 private SettingsSource globalSettingsSource;
36
37 private SettingsSource userSettingsSource;
38
39 private Properties systemProperties;
40
41 private Properties userProperties;
42
43 @Override
44 public File getGlobalSettingsFile() {
45 return globalSettingsFile;
46 }
47
48 @Override
49 public DefaultSettingsBuildingRequest setGlobalSettingsFile(File globalSettingsFile) {
50 this.globalSettingsFile = globalSettingsFile;
51
52 return this;
53 }
54
55 @Override
56 public SettingsSource getGlobalSettingsSource() {
57 return globalSettingsSource;
58 }
59
60 @Override
61 public DefaultSettingsBuildingRequest setGlobalSettingsSource(SettingsSource globalSettingsSource) {
62 this.globalSettingsSource = globalSettingsSource;
63
64 return this;
65 }
66
67 @Override
68 public File getUserSettingsFile() {
69 return userSettingsFile;
70 }
71
72 @Override
73 public DefaultSettingsBuildingRequest setUserSettingsFile(File userSettingsFile) {
74 this.userSettingsFile = userSettingsFile;
75
76 return this;
77 }
78
79 @Override
80 public SettingsSource getUserSettingsSource() {
81 return userSettingsSource;
82 }
83
84 @Override
85 public DefaultSettingsBuildingRequest setUserSettingsSource(SettingsSource userSettingsSource) {
86 this.userSettingsSource = userSettingsSource;
87
88 return this;
89 }
90
91 @Override
92 public Properties getSystemProperties() {
93 if (systemProperties == null) {
94 systemProperties = new Properties();
95 }
96
97 return systemProperties;
98 }
99
100 @Override
101 public DefaultSettingsBuildingRequest setSystemProperties(Properties systemProperties) {
102 if (systemProperties != null) {
103 this.systemProperties = new Properties();
104 synchronized (
105 systemProperties) {
106
107 this.systemProperties.putAll(systemProperties);
108 }
109 } else {
110 this.systemProperties = null;
111 }
112
113 return this;
114 }
115
116 @Override
117 public Properties getUserProperties() {
118 if (userProperties == null) {
119 userProperties = new Properties();
120 }
121
122 return userProperties;
123 }
124
125 @Override
126 public DefaultSettingsBuildingRequest setUserProperties(Properties userProperties) {
127 if (userProperties != null) {
128 this.userProperties = new Properties();
129 this.userProperties.putAll(userProperties);
130 } else {
131 this.userProperties = null;
132 }
133
134 return this;
135 }
136 }