1   
2   
3   
4   
5   
6   package org.apache.maven.model;
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  @SuppressWarnings( "all" )
20  public class CiManagement
21      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
22  {
23  
24        
25       
26      
27  
28      
29  
30  
31  
32  
33  
34  
35  
36      private String system;
37  
38      
39  
40  
41  
42  
43      private String url;
44  
45      
46  
47  
48      private java.util.List<Notifier> notifiers;
49  
50      
51  
52  
53      private java.util.Map<Object, InputLocation> locations;
54  
55      
56  
57  
58      private InputLocation location;
59  
60      
61  
62  
63      private InputLocation systemLocation;
64  
65      
66  
67  
68      private InputLocation urlLocation;
69  
70      
71  
72  
73      private InputLocation notifiersLocation;
74  
75  
76        
77       
78      
79  
80      
81  
82  
83  
84  
85      public void addNotifier( Notifier notifier )
86      {
87          getNotifiers().add( notifier );
88      } 
89  
90      
91  
92  
93  
94  
95      public CiManagement clone()
96      {
97          try
98          {
99              CiManagement copy = (CiManagement) super.clone();
100 
101             if ( this.notifiers != null )
102             {
103                 copy.notifiers = new java.util.ArrayList<Notifier>();
104                 for ( Notifier item : this.notifiers )
105                 {
106                     copy.notifiers.add( ( (Notifier) item).clone() );
107                 }
108             }
109 
110             if ( copy.locations != null )
111             {
112                 copy.locations = new java.util.LinkedHashMap( copy.locations );
113             }
114 
115             return copy;
116         }
117         catch ( java.lang.Exception ex )
118         {
119             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
120                 + " does not support clone()" ).initCause( ex );
121         }
122     } 
123 
124     
125 
126 
127 
128 
129 
130     public InputLocation getLocation( Object key )
131     {
132         if ( key instanceof String )
133         {
134             switch ( ( String ) key )
135             {
136                 case "" :
137                 {
138                     return this.location;
139                 }
140                 case "system" :
141                 {
142                     return systemLocation;
143                 }
144                 case "url" :
145                 {
146                     return urlLocation;
147                 }
148                 case "notifiers" :
149                 {
150                     return notifiersLocation;
151                 }
152                 default :
153                 {
154                     return getOtherLocation( key );
155                 }
156                 }
157             }
158             else
159             {
160                 return getOtherLocation( key );
161             }
162     } 
163 
164     
165 
166 
167 
168 
169     public java.util.List<Notifier> getNotifiers()
170     {
171         if ( this.notifiers == null )
172         {
173             this.notifiers = new java.util.ArrayList<Notifier>();
174         }
175 
176         return this.notifiers;
177     } 
178 
179     
180 
181 
182 
183 
184 
185     public void setLocation( Object key, InputLocation location )
186     {
187         if ( key instanceof String )
188         {
189             switch ( ( String ) key )
190             {
191                 case "" :
192                 {
193                     this.location = location;
194                     return;
195                 }
196                 case "system" :
197                 {
198                     systemLocation = location;
199                     return;
200                 }
201                 case "url" :
202                 {
203                     urlLocation = location;
204                     return;
205                 }
206                 case "notifiers" :
207                 {
208                     notifiersLocation = location;
209                     return;
210                 }
211                 default :
212                 {
213                     setOtherLocation( key, location );
214                     return;
215                 }
216             }
217         }
218         else
219         {
220             setOtherLocation( key, location );
221         }
222     } 
223 
224     
225 
226 
227 
228 
229 
230     public void setOtherLocation( Object key, InputLocation location )
231     {
232         if ( location != null )
233         {
234             if ( this.locations == null )
235             {
236                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
237             }
238             this.locations.put( key, location );
239         }
240     } 
241 
242     
243 
244 
245 
246 
247 
248     private InputLocation getOtherLocation( Object key )
249     {
250         return ( locations != null ) ? locations.get( key ) : null;
251     } 
252 
253     
254 
255 
256 
257 
258 
259     public String getSystem()
260     {
261         return this.system;
262     } 
263 
264     
265 
266 
267 
268 
269 
270 
271     public String getUrl()
272     {
273         return this.url;
274     } 
275 
276     
277 
278 
279 
280 
281     public void removeNotifier( Notifier notifier )
282     {
283         getNotifiers().remove( notifier );
284     } 
285 
286     
287 
288 
289 
290 
291 
292 
293 
294     public void setNotifiers( java.util.List<Notifier> notifiers )
295     {
296         this.notifiers = notifiers;
297     } 
298 
299     
300 
301 
302 
303 
304 
305     public void setSystem( String system )
306     {
307         this.system = system;
308     } 
309 
310     
311 
312 
313 
314 
315 
316 
317     public void setUrl( String url )
318     {
319         this.url = url;
320     } 
321 
322 }