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 (systemProperties) {
105
106 this.systemProperties.putAll(systemProperties);
107 }
108 } else {
109 this.systemProperties = null;
110 }
111
112 return this;
113 }
114
115 @Override
116 public Properties getUserProperties() {
117 if (userProperties == null) {
118 userProperties = new Properties();
119 }
120
121 return userProperties;
122 }
123
124 @Override
125 public DefaultSettingsBuildingRequest setUserProperties(Properties userProperties) {
126 if (userProperties != null) {
127 this.userProperties = new Properties();
128 this.userProperties.putAll(userProperties);
129 } else {
130 this.userProperties = null;
131 }
132
133 return this;
134 }
135 }