1
2
3
4
5
6 package org.apache.maven.model;
7
8
9
10
11
12
13
14
15
16 @SuppressWarnings( "all" )
17 public class DistributionManagement
18 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
19 {
20
21
22
23
24
25
26
27
28
29
30 private DeploymentRepository repository;
31
32
33
34
35
36
37
38
39
40
41 private DeploymentRepository snapshotRepository;
42
43
44
45
46 private Site site;
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61 private String downloadUrl;
62
63
64
65
66
67
68 private Relocation relocation;
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90 private String status;
91
92
93
94
95 private java.util.Map<Object, InputLocation> locations;
96
97
98
99
100 private InputLocation location;
101
102
103
104
105 private InputLocation repositoryLocation;
106
107
108
109
110 private InputLocation snapshotRepositoryLocation;
111
112
113
114
115 private InputLocation siteLocation;
116
117
118
119
120 private InputLocation downloadUrlLocation;
121
122
123
124
125 private InputLocation relocationLocation;
126
127
128
129
130 private InputLocation statusLocation;
131
132
133
134
135
136
137
138
139
140
141
142 public DistributionManagement clone()
143 {
144 try
145 {
146 DistributionManagement copy = (DistributionManagement) super.clone();
147
148 if ( this.repository != null )
149 {
150 copy.repository = (DeploymentRepository) this.repository.clone();
151 }
152
153 if ( this.snapshotRepository != null )
154 {
155 copy.snapshotRepository = (DeploymentRepository) this.snapshotRepository.clone();
156 }
157
158 if ( this.site != null )
159 {
160 copy.site = (Site) this.site.clone();
161 }
162
163 if ( this.relocation != null )
164 {
165 copy.relocation = (Relocation) this.relocation.clone();
166 }
167
168 if ( copy.locations != null )
169 {
170 copy.locations = new java.util.LinkedHashMap( copy.locations );
171 }
172
173 return copy;
174 }
175 catch ( java.lang.Exception ex )
176 {
177 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
178 + " does not support clone()" ).initCause( ex );
179 }
180 }
181
182
183
184
185
186
187
188
189
190
191
192
193 public String getDownloadUrl()
194 {
195 return this.downloadUrl;
196 }
197
198
199
200
201
202
203
204 public InputLocation getLocation( Object key )
205 {
206 if ( key instanceof String )
207 {
208 switch ( ( String ) key )
209 {
210 case "" :
211 {
212 return this.location;
213 }
214 case "repository" :
215 {
216 return repositoryLocation;
217 }
218 case "snapshotRepository" :
219 {
220 return snapshotRepositoryLocation;
221 }
222 case "site" :
223 {
224 return siteLocation;
225 }
226 case "downloadUrl" :
227 {
228 return downloadUrlLocation;
229 }
230 case "relocation" :
231 {
232 return relocationLocation;
233 }
234 case "status" :
235 {
236 return statusLocation;
237 }
238 default :
239 {
240 return getOtherLocation( key );
241 }
242 }
243 }
244 else
245 {
246 return getOtherLocation( key );
247 }
248 }
249
250
251
252
253
254
255
256 public void setLocation( Object key, InputLocation location )
257 {
258 if ( key instanceof String )
259 {
260 switch ( ( String ) key )
261 {
262 case "" :
263 {
264 this.location = location;
265 return;
266 }
267 case "repository" :
268 {
269 repositoryLocation = location;
270 return;
271 }
272 case "snapshotRepository" :
273 {
274 snapshotRepositoryLocation = location;
275 return;
276 }
277 case "site" :
278 {
279 siteLocation = location;
280 return;
281 }
282 case "downloadUrl" :
283 {
284 downloadUrlLocation = location;
285 return;
286 }
287 case "relocation" :
288 {
289 relocationLocation = location;
290 return;
291 }
292 case "status" :
293 {
294 statusLocation = location;
295 return;
296 }
297 default :
298 {
299 setOtherLocation( key, location );
300 return;
301 }
302 }
303 }
304 else
305 {
306 setOtherLocation( key, location );
307 }
308 }
309
310
311
312
313
314
315
316 public void setOtherLocation( Object key, InputLocation location )
317 {
318 if ( location != null )
319 {
320 if ( this.locations == null )
321 {
322 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
323 }
324 this.locations.put( key, location );
325 }
326 }
327
328
329
330
331
332
333
334 private InputLocation getOtherLocation( Object key )
335 {
336 return ( locations != null ) ? locations.get( key ) : null;
337 }
338
339
340
341
342
343
344
345
346 public Relocation getRelocation()
347 {
348 return this.relocation;
349 }
350
351
352
353
354
355
356
357
358 public DeploymentRepository getRepository()
359 {
360 return this.repository;
361 }
362
363
364
365
366
367
368
369 public Site getSite()
370 {
371 return this.site;
372 }
373
374
375
376
377
378
379
380
381 public DeploymentRepository getSnapshotRepository()
382 {
383 return this.snapshotRepository;
384 }
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404 public String getStatus()
405 {
406 return this.status;
407 }
408
409
410
411
412
413
414
415
416
417
418
419
420 public void setDownloadUrl( String downloadUrl )
421 {
422 this.downloadUrl = downloadUrl;
423 }
424
425
426
427
428
429
430
431
432 public void setRelocation( Relocation relocation )
433 {
434 this.relocation = relocation;
435 }
436
437
438
439
440
441
442
443
444 public void setRepository( DeploymentRepository repository )
445 {
446 this.repository = repository;
447 }
448
449
450
451
452
453
454
455 public void setSite( Site site )
456 {
457 this.site = site;
458 }
459
460
461
462
463
464
465
466
467 public void setSnapshotRepository( DeploymentRepository snapshotRepository )
468 {
469 this.snapshotRepository = snapshotRepository;
470 }
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490 public void setStatus( String status )
491 {
492 this.status = status;
493 }
494
495 }