View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2013-02-24 03:32:14,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.model;
9   
10  /**
11   * 
12   *         
13   *         The <code>&lt;CiManagement&gt;</code> element contains
14   * informations required to the
15   *         continuous integration system of the project.
16   *         
17   *       
18   * 
19   * @version $Revision$ $Date$
20   */
21  @SuppressWarnings( "all" )
22  public class CiManagement
23      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
24  {
25  
26        //--------------------------/
27       //- Class/Member Variables -/
28      //--------------------------/
29  
30      /**
31       * 
32       *             
33       *             The name of the continuous integration system,
34       * e.g. <code>continuum</code>.
35       *             
36       *           
37       */
38      private String system;
39  
40      /**
41       * URL for the continuous integration system used by the
42       * project if it has a web
43       *             interface.
44       */
45      private String url;
46  
47      /**
48       * Field notifiers.
49       */
50      private java.util.List<Notifier> notifiers;
51  
52      /**
53       * Field locations.
54       */
55      private java.util.Map<Object, InputLocation> locations;
56  
57  
58        //-----------/
59       //- Methods -/
60      //-----------/
61  
62      /**
63       * Method addNotifier.
64       * 
65       * @param notifier
66       */
67      public void addNotifier( Notifier notifier )
68      {
69          getNotifiers().add( notifier );
70      } //-- void addNotifier( Notifier )
71  
72      /**
73       * Method clone.
74       * 
75       * @return CiManagement
76       */
77      public CiManagement clone()
78      {
79          try
80          {
81              CiManagement copy = (CiManagement) super.clone();
82  
83              if ( this.notifiers != null )
84              {
85                  copy.notifiers = new java.util.ArrayList<Notifier>();
86                  for ( Notifier item : this.notifiers )
87                  {
88                      copy.notifiers.add( ( (Notifier) item).clone() );
89                  }
90              }
91  
92              if ( copy.locations != null )
93              {
94                  copy.locations = new java.util.LinkedHashMap( copy.locations );
95              }
96  
97              return copy;
98          }
99          catch ( java.lang.Exception ex )
100         {
101             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
102                 + " does not support clone()" ).initCause( ex );
103         }
104     } //-- CiManagement clone()
105 
106     /**
107      * 
108      * 
109      * @param key
110      * @return InputLocation
111      */
112     public InputLocation getLocation( Object key )
113     {
114         return ( locations != null ) ? locations.get( key ) : null;
115     } //-- InputLocation getLocation( Object )
116 
117     /**
118      * Method getNotifiers.
119      * 
120      * @return List
121      */
122     public java.util.List<Notifier> getNotifiers()
123     {
124         if ( this.notifiers == null )
125         {
126             this.notifiers = new java.util.ArrayList<Notifier>();
127         }
128 
129         return this.notifiers;
130     } //-- java.util.List<Notifier> getNotifiers()
131 
132     /**
133      * Get the name of the continuous integration system, e.g.
134      * <code>continuum</code>.
135      * 
136      * @return String
137      */
138     public String getSystem()
139     {
140         return this.system;
141     } //-- String getSystem()
142 
143     /**
144      * Get uRL for the continuous integration system used by the
145      * project if it has a web
146      *             interface.
147      * 
148      * @return String
149      */
150     public String getUrl()
151     {
152         return this.url;
153     } //-- String getUrl()
154 
155     /**
156      * Method removeNotifier.
157      * 
158      * @param notifier
159      */
160     public void removeNotifier( Notifier notifier )
161     {
162         getNotifiers().remove( notifier );
163     } //-- void removeNotifier( Notifier )
164 
165     /**
166      * 
167      * 
168      * @param key
169      * @param location
170      */
171     public void setLocation( Object key, InputLocation location )
172     {
173         if ( location != null )
174         {
175             if ( this.locations == null )
176             {
177                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
178             }
179             this.locations.put( key, location );
180         }
181     } //-- void setLocation( Object, InputLocation )
182 
183     /**
184      * Set configuration for notifying developers/users when a
185      * build is unsuccessful,
186      *             including user information and notification
187      * mode.
188      * 
189      * @param notifiers
190      */
191     public void setNotifiers( java.util.List<Notifier> notifiers )
192     {
193         this.notifiers = notifiers;
194     } //-- void setNotifiers( java.util.List )
195 
196     /**
197      * Set the name of the continuous integration system, e.g.
198      * <code>continuum</code>.
199      * 
200      * @param system
201      */
202     public void setSystem( String system )
203     {
204         this.system = system;
205     } //-- void setSystem( String )
206 
207     /**
208      * Set uRL for the continuous integration system used by the
209      * project if it has a web
210      *             interface.
211      * 
212      * @param url
213      */
214     public void setUrl( String url )
215     {
216         this.url = url;
217     } //-- void setUrl( String )
218 
219 }