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