1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.apache.maven.settings;
25
26
27
28
29
30
31
32
33
34
35
36
37 @SuppressWarnings( "all" )
38 public class Profile
39 extends IdentifiableBase
40 implements java.io.Serializable, java.lang.Cloneable
41 {
42
43
44
45
46
47
48
49
50
51
52
53
54
55 private Activation activation;
56
57
58
59
60 private java.util.Properties properties;
61
62
63
64
65 private java.util.List<Repository> repositories;
66
67
68
69
70
71
72
73
74
75
76
77 private java.util.List<Repository> pluginRepositories;
78
79
80
81
82
83
84
85
86
87
88
89 public void addPluginRepository( Repository repository )
90 {
91 getPluginRepositories().add( repository );
92 }
93
94
95
96
97
98
99
100 public void addProperty( String key, String value )
101 {
102 getProperties().put( key, value );
103 }
104
105
106
107
108
109
110 public void addRepository( Repository repository )
111 {
112 getRepositories().add( repository );
113 }
114
115
116
117
118
119
120 public Profile clone()
121 {
122 try
123 {
124 Profile copy = (Profile) super.clone();
125
126 if ( this.activation != null )
127 {
128 copy.activation = (Activation) this.activation.clone();
129 }
130
131 if ( this.properties != null )
132 {
133 copy.properties = (java.util.Properties) this.properties.clone();
134 }
135
136 if ( this.repositories != null )
137 {
138 copy.repositories = new java.util.ArrayList<Repository>();
139 for ( Repository item : this.repositories )
140 {
141 copy.repositories.add( ( (Repository) item).clone() );
142 }
143 }
144
145 if ( this.pluginRepositories != null )
146 {
147 copy.pluginRepositories = new java.util.ArrayList<Repository>();
148 for ( Repository item : this.pluginRepositories )
149 {
150 copy.pluginRepositories.add( ( (Repository) item).clone() );
151 }
152 }
153
154 return copy;
155 }
156 catch ( java.lang.Exception ex )
157 {
158 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
159 + " does not support clone()" ).initCause( ex );
160 }
161 }
162
163
164
165
166
167
168
169 public Activation getActivation()
170 {
171 return this.activation;
172 }
173
174
175
176
177
178
179 public java.util.List<Repository> getPluginRepositories()
180 {
181 if ( this.pluginRepositories == null )
182 {
183 this.pluginRepositories = new java.util.ArrayList<Repository>();
184 }
185
186 return this.pluginRepositories;
187 }
188
189
190
191
192
193
194 public java.util.Properties getProperties()
195 {
196 if ( this.properties == null )
197 {
198 this.properties = new java.util.Properties();
199 }
200
201 return this.properties;
202 }
203
204
205
206
207
208
209 public java.util.List<Repository> getRepositories()
210 {
211 if ( this.repositories == null )
212 {
213 this.repositories = new java.util.ArrayList<Repository>();
214 }
215
216 return this.repositories;
217 }
218
219
220
221
222
223
224 public void removePluginRepository( Repository repository )
225 {
226 getPluginRepositories().remove( repository );
227 }
228
229
230
231
232
233
234 public void removeRepository( Repository repository )
235 {
236 getRepositories().remove( repository );
237 }
238
239
240
241
242
243
244
245 public void setActivation( Activation activation )
246 {
247 this.activation = activation;
248 }
249
250
251
252
253
254
255
256 public void setPluginRepositories( java.util.List<Repository> pluginRepositories )
257 {
258 this.pluginRepositories = pluginRepositories;
259 }
260
261
262
263
264
265
266
267
268
269
270 public void setProperties( java.util.Properties properties )
271 {
272 this.properties = properties;
273 }
274
275
276
277
278
279
280 public void setRepositories( java.util.List<Repository> repositories )
281 {
282 this.repositories = repositories;
283 }
284
285 }