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