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