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