View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-01-20 18:09:18,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.model;
9   
10  /**
11   * Description of a person who has contributed to the project, but
12   * who does not have
13   *         commit privileges. Usually, these contributions come in
14   * the form of patches submitted.
15   * 
16   * @version $Revision$ $Date$
17   */
18  @SuppressWarnings( "all" )
19  public class Contributor
20      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
21  {
22  
23        //--------------------------/
24       //- Class/Member Variables -/
25      //--------------------------/
26  
27      /**
28       * The full name of the contributor.
29       */
30      private String name;
31  
32      /**
33       * The email address of the contributor.
34       */
35      private String email;
36  
37      /**
38       * The URL for the homepage of the contributor.
39       */
40      private String url;
41  
42      /**
43       * The organization to which the contributor belongs.
44       */
45      private String organization;
46  
47      /**
48       * The URL of the organization.
49       */
50      private String organizationUrl;
51  
52      /**
53       * Field roles.
54       */
55      private java.util.List<String> roles;
56  
57      /**
58       * 
59       *             
60       *               The timezone the contributor is in. Typically,
61       * this is a number in the range
62       *               <a
63       * href="http://en.wikipedia.org/wiki/UTC%E2%88%9212:00">-12</a>
64       * to <a
65       * href="http://en.wikipedia.org/wiki/UTC%2B14:00">+14</a>
66       *               or a valid time zone id like
67       * "America/Montreal" (UTC-05:00) or "Europe/Paris"
68       * (UTC+01:00).
69       *             
70       *           
71       */
72      private String timezone;
73  
74      /**
75       * Field properties.
76       */
77      private java.util.Properties properties;
78  
79      /**
80       * Field locations.
81       */
82      private java.util.Map<Object, InputLocation> locations;
83  
84  
85        //-----------/
86       //- Methods -/
87      //-----------/
88  
89      /**
90       * Method addProperty.
91       * 
92       * @param key
93       * @param value
94       */
95      public void addProperty( String key, String value )
96      {
97          getProperties().put( key, value );
98      } //-- void addProperty( String, String )
99  
100     /**
101      * Method addRole.
102      * 
103      * @param string
104      */
105     public void addRole( String string )
106     {
107         getRoles().add( string );
108     } //-- void addRole( String )
109 
110     /**
111      * Method clone.
112      * 
113      * @return Contributor
114      */
115     public Contributor clone()
116     {
117         try
118         {
119             Contributor copy = (Contributor) super.clone();
120 
121             if ( this.roles != null )
122             {
123                 copy.roles = new java.util.ArrayList<String>();
124                 copy.roles.addAll( this.roles );
125             }
126 
127             if ( this.properties != null )
128             {
129                 copy.properties = (java.util.Properties) this.properties.clone();
130             }
131 
132             if ( copy.locations != null )
133             {
134                 copy.locations = new java.util.LinkedHashMap( copy.locations );
135             }
136 
137             return copy;
138         }
139         catch ( java.lang.Exception ex )
140         {
141             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
142                 + " does not support clone()" ).initCause( ex );
143         }
144     } //-- Contributor clone()
145 
146     /**
147      * Get the email address of the contributor.
148      * 
149      * @return String
150      */
151     public String getEmail()
152     {
153         return this.email;
154     } //-- String getEmail()
155 
156     /**
157      * 
158      * 
159      * @param key
160      * @return InputLocation
161      */
162     public InputLocation getLocation( Object key )
163     {
164         return ( locations != null ) ? locations.get( key ) : null;
165     } //-- InputLocation getLocation( Object )
166 
167     /**
168      * Get the full name of the contributor.
169      * 
170      * @return String
171      */
172     public String getName()
173     {
174         return this.name;
175     } //-- String getName()
176 
177     /**
178      * Get the organization to which the contributor belongs.
179      * 
180      * @return String
181      */
182     public String getOrganization()
183     {
184         return this.organization;
185     } //-- String getOrganization()
186 
187     /**
188      * Get the URL of the organization.
189      * 
190      * @return String
191      */
192     public String getOrganizationUrl()
193     {
194         return this.organizationUrl;
195     } //-- String getOrganizationUrl()
196 
197     /**
198      * Method getProperties.
199      * 
200      * @return Properties
201      */
202     public java.util.Properties getProperties()
203     {
204         if ( this.properties == null )
205         {
206             this.properties = new java.util.Properties();
207         }
208 
209         return this.properties;
210     } //-- java.util.Properties getProperties()
211 
212     /**
213      * Method getRoles.
214      * 
215      * @return List
216      */
217     public java.util.List<String> getRoles()
218     {
219         if ( this.roles == null )
220         {
221             this.roles = new java.util.ArrayList<String>();
222         }
223 
224         return this.roles;
225     } //-- java.util.List<String> getRoles()
226 
227     /**
228      * Get the timezone the contributor is in. Typically, this is a
229      * number in the range
230      *               <a
231      * href="http://en.wikipedia.org/wiki/UTC%E2%88%9212:00">-12</a>
232      * to <a
233      * href="http://en.wikipedia.org/wiki/UTC%2B14:00">+14</a>
234      *               or a valid time zone id like
235      * "America/Montreal" (UTC-05:00) or "Europe/Paris"
236      * (UTC+01:00).
237      * 
238      * @return String
239      */
240     public String getTimezone()
241     {
242         return this.timezone;
243     } //-- String getTimezone()
244 
245     /**
246      * Get the URL for the homepage of the contributor.
247      * 
248      * @return String
249      */
250     public String getUrl()
251     {
252         return this.url;
253     } //-- String getUrl()
254 
255     /**
256      * Method removeRole.
257      * 
258      * @param string
259      */
260     public void removeRole( String string )
261     {
262         getRoles().remove( string );
263     } //-- void removeRole( String )
264 
265     /**
266      * Set the email address of the contributor.
267      * 
268      * @param email
269      */
270     public void setEmail( String email )
271     {
272         this.email = email;
273     } //-- void setEmail( String )
274 
275     /**
276      * 
277      * 
278      * @param key
279      * @param location
280      */
281     public void setLocation( Object key, InputLocation location )
282     {
283         if ( location != null )
284         {
285             if ( this.locations == null )
286             {
287                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
288             }
289             this.locations.put( key, location );
290         }
291     } //-- void setLocation( Object, InputLocation )
292 
293     /**
294      * Set the full name of the contributor.
295      * 
296      * @param name
297      */
298     public void setName( String name )
299     {
300         this.name = name;
301     } //-- void setName( String )
302 
303     /**
304      * Set the organization to which the contributor belongs.
305      * 
306      * @param organization
307      */
308     public void setOrganization( String organization )
309     {
310         this.organization = organization;
311     } //-- void setOrganization( String )
312 
313     /**
314      * Set the URL of the organization.
315      * 
316      * @param organizationUrl
317      */
318     public void setOrganizationUrl( String organizationUrl )
319     {
320         this.organizationUrl = organizationUrl;
321     } //-- void setOrganizationUrl( String )
322 
323     /**
324      * Set properties about the contributor, such as an instant
325      * messenger handle.
326      * 
327      * @param properties
328      */
329     public void setProperties( java.util.Properties properties )
330     {
331         this.properties = properties;
332     } //-- void setProperties( java.util.Properties )
333 
334     /**
335      * Set the roles the contributor plays in the project. Each
336      * role is described by a
337      *             <code>role</code> element, the body of which is
338      * a role name. This can also be used to
339      *             describe the contribution.
340      * 
341      * @param roles
342      */
343     public void setRoles( java.util.List<String> roles )
344     {
345         this.roles = roles;
346     } //-- void setRoles( java.util.List )
347 
348     /**
349      * Set the timezone the contributor is in. Typically, this is a
350      * number in the range
351      *               <a
352      * href="http://en.wikipedia.org/wiki/UTC%E2%88%9212:00">-12</a>
353      * to <a
354      * href="http://en.wikipedia.org/wiki/UTC%2B14:00">+14</a>
355      *               or a valid time zone id like
356      * "America/Montreal" (UTC-05:00) or "Europe/Paris"
357      * (UTC+01:00).
358      * 
359      * @param timezone
360      */
361     public void setTimezone( String timezone )
362     {
363         this.timezone = timezone;
364     } //-- void setTimezone( String )
365 
366     /**
367      * Set the URL for the homepage of the contributor.
368      * 
369      * @param url
370      */
371     public void setUrl( String url )
372     {
373         this.url = url;
374     } //-- void setUrl( String )
375 
376 }