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