View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.11,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.model;
7   
8   /**
9    * 
10   *         
11   *         The <code>&lt;scm&gt;</code> element contains
12   * informations required to the SCM
13   *         (Source Control Management) of the project.
14   *         
15   *       
16   * 
17   * @version $Revision$ $Date$
18   */
19  @SuppressWarnings( "all" )
20  public class Scm
21      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
22  {
23  
24        //--------------------------/
25       //- Class/Member Variables -/
26      //--------------------------/
27  
28      /**
29       * 
30       *             
31       *             The source control management system URL
32       *             that describes the repository and how to connect
33       * to the
34       *             repository. For more information, see the
35       *             <a
36       * href="https://maven.apache.org/scm/scm-url-format.html">URL
37       * format</a>
38       *             and <a
39       * href="https://maven.apache.org/scm/scms-overview.html">list
40       * of supported SCMs</a>.
41       *             This connection is read-only.
42       *             <br><b>Default value is</b>: parent value [+
43       * path adjustment] + (artifactId or project.directory
44       * property), or just parent value if
45       *             scm's
46       * <code>child.scm.connection.inherit.append.path="false"</code>
47       *             
48       *           
49       */
50      private String connection;
51  
52      /**
53       * 
54       *             
55       *             Just like <code>connection</code>, but for
56       * developers, i.e. this scm connection
57       *             will not be read only.
58       *             <br><b>Default value is</b>: parent value [+
59       * path adjustment] + (artifactId or project.directory
60       * property), or just parent value if
61       *             scm's
62       * <code>child.scm.developerConnection.inherit.append.path="false"</code>
63       *             
64       *           
65       */
66      private String developerConnection;
67  
68      /**
69       * The tag of current code. By default, it's set to HEAD during
70       * development.
71       */
72      private String tag = "HEAD";
73  
74      /**
75       * 
76       *             
77       *             The URL to the project's browsable SCM
78       * repository, such as ViewVC or Fisheye.
79       *             <br><b>Default value is</b>: parent value [+
80       * path adjustment] + (artifactId or project.directory
81       * property), or just parent value if
82       *             scm's
83       * <code>child.scm.url.inherit.append.path="false"</code>
84       *             
85       *           
86       */
87      private String url;
88  
89      /**
90       * 
91       *             
92       *             When children inherit from scm connection,
93       * append path or not? Note: While the type
94       *             of this field is <code>String</code> for
95       * technical reasons, the semantic type is actually
96       *             <code>Boolean</code>
97       *             <br><b>Default value is</b>: <code>true</code>
98       *             <br><b>Since</b>: Maven 3.6.1
99       *             
100      *           .
101      */
102     private String childScmConnectionInheritAppendPath;
103 
104     /**
105      * 
106      *             
107      *             When children inherit from scm developer
108      * connection, append path or not? Note: While the type
109      *             of this field is <code>String</code> for
110      * technical reasons, the semantic type is actually
111      *             <code>Boolean</code>
112      *             <br><b>Default value is</b>: <code>true</code>
113      *             <br><b>Since</b>: Maven 3.6.1
114      *             
115      *           .
116      */
117     private String childScmDeveloperConnectionInheritAppendPath;
118 
119     /**
120      * 
121      *             
122      *             When children inherit from scm url, append path
123      * or not? Note: While the type
124      *             of this field is <code>String</code> for
125      * technical reasons, the semantic type is actually
126      *             <code>Boolean</code>
127      *             <br><b>Default value is</b>: <code>true</code>
128      *             <br><b>Since</b>: Maven 3.6.1
129      *             
130      *           .
131      */
132     private String childScmUrlInheritAppendPath;
133 
134     /**
135      * Field locations.
136      */
137     private java.util.Map<Object, InputLocation> locations;
138 
139     /**
140      * Field location.
141      */
142     private InputLocation location;
143 
144     /**
145      * Field connectionLocation.
146      */
147     private InputLocation connectionLocation;
148 
149     /**
150      * Field developerConnectionLocation.
151      */
152     private InputLocation developerConnectionLocation;
153 
154     /**
155      * Field tagLocation.
156      */
157     private InputLocation tagLocation;
158 
159     /**
160      * Field urlLocation.
161      */
162     private InputLocation urlLocation;
163 
164     /**
165      * Field childScmConnectionInheritAppendPathLocation.
166      */
167     private InputLocation childScmConnectionInheritAppendPathLocation;
168 
169     /**
170      * Field childScmDeveloperConnectionInheritAppendPathLocation.
171      */
172     private InputLocation childScmDeveloperConnectionInheritAppendPathLocation;
173 
174     /**
175      * Field childScmUrlInheritAppendPathLocation.
176      */
177     private InputLocation childScmUrlInheritAppendPathLocation;
178 
179 
180       //-----------/
181      //- Methods -/
182     //-----------/
183 
184     /**
185      * Method clone.
186      * 
187      * @return Scm
188      */
189     public Scm clone()
190     {
191         try
192         {
193             Scm copy = (Scm) super.clone();
194 
195             if ( copy.locations != null )
196             {
197                 copy.locations = new java.util.LinkedHashMap( copy.locations );
198             }
199 
200             return copy;
201         }
202         catch ( java.lang.Exception ex )
203         {
204             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
205                 + " does not support clone()" ).initCause( ex );
206         }
207     } //-- Scm clone()
208 
209     /**
210      * Get when children inherit from scm connection, append path
211      * or not? Note: While the type
212      *             of this field is <code>String</code> for
213      * technical reasons, the semantic type is actually
214      *             <code>Boolean</code>
215      *             <br><b>Default value is</b>: <code>true</code>
216      *             <br><b>Since</b>: Maven 3.6.1.
217      * 
218      * @return String
219      */
220     public String getChildScmConnectionInheritAppendPath()
221     {
222         return this.childScmConnectionInheritAppendPath;
223     } //-- String getChildScmConnectionInheritAppendPath()
224 
225     /**
226      * Get when children inherit from scm developer connection,
227      * append path or not? Note: While the type
228      *             of this field is <code>String</code> for
229      * technical reasons, the semantic type is actually
230      *             <code>Boolean</code>
231      *             <br><b>Default value is</b>: <code>true</code>
232      *             <br><b>Since</b>: Maven 3.6.1.
233      * 
234      * @return String
235      */
236     public String getChildScmDeveloperConnectionInheritAppendPath()
237     {
238         return this.childScmDeveloperConnectionInheritAppendPath;
239     } //-- String getChildScmDeveloperConnectionInheritAppendPath()
240 
241     /**
242      * Get when children inherit from scm url, append path or not?
243      * Note: While the type
244      *             of this field is <code>String</code> for
245      * technical reasons, the semantic type is actually
246      *             <code>Boolean</code>
247      *             <br><b>Default value is</b>: <code>true</code>
248      *             <br><b>Since</b>: Maven 3.6.1.
249      * 
250      * @return String
251      */
252     public String getChildScmUrlInheritAppendPath()
253     {
254         return this.childScmUrlInheritAppendPath;
255     } //-- String getChildScmUrlInheritAppendPath()
256 
257     /**
258      * Get the source control management system URL
259      *             that describes the repository and how to connect
260      * to the
261      *             repository. For more information, see the
262      *             <a
263      * href="https://maven.apache.org/scm/scm-url-format.html">URL
264      * format</a>
265      *             and <a
266      * href="https://maven.apache.org/scm/scms-overview.html">list
267      * of supported SCMs</a>.
268      *             This connection is read-only.
269      *             <br><b>Default value is</b>: parent value [+
270      * path adjustment] + (artifactId or project.directory
271      * property), or just parent value if
272      *             scm's
273      * <code>child.scm.connection.inherit.append.path="false"</code>
274      * 
275      * @return String
276      */
277     public String getConnection()
278     {
279         return this.connection;
280     } //-- String getConnection()
281 
282     /**
283      * Get just like <code>connection</code>, but for developers,
284      * i.e. this scm connection
285      *             will not be read only.
286      *             <br><b>Default value is</b>: parent value [+
287      * path adjustment] + (artifactId or project.directory
288      * property), or just parent value if
289      *             scm's
290      * <code>child.scm.developerConnection.inherit.append.path="false"</code>
291      * 
292      * @return String
293      */
294     public String getDeveloperConnection()
295     {
296         return this.developerConnection;
297     } //-- String getDeveloperConnection()
298 
299     /**
300      * 
301      * 
302      * @param key
303      * @return InputLocation
304      */
305     public InputLocation getLocation( Object key )
306     {
307         if ( key instanceof String )
308         {
309             switch ( ( String ) key )
310             {
311                 case "" :
312                 {
313                     return this.location;
314                 }
315                 case "connection" :
316                 {
317                     return connectionLocation;
318                 }
319                 case "developerConnection" :
320                 {
321                     return developerConnectionLocation;
322                 }
323                 case "tag" :
324                 {
325                     return tagLocation;
326                 }
327                 case "url" :
328                 {
329                     return urlLocation;
330                 }
331                 case "childScmConnectionInheritAppendPath" :
332                 {
333                     return childScmConnectionInheritAppendPathLocation;
334                 }
335                 case "childScmDeveloperConnectionInheritAppendPath" :
336                 {
337                     return childScmDeveloperConnectionInheritAppendPathLocation;
338                 }
339                 case "childScmUrlInheritAppendPath" :
340                 {
341                     return childScmUrlInheritAppendPathLocation;
342                 }
343                 default :
344                 {
345                     return getOtherLocation( key );
346                 }
347                 }
348             }
349             else
350             {
351                 return getOtherLocation( key );
352             }
353     } //-- InputLocation getLocation( Object )
354 
355     /**
356      * 
357      * 
358      * @param key
359      * @param location
360      */
361     public void setLocation( Object key, InputLocation location )
362     {
363         if ( key instanceof String )
364         {
365             switch ( ( String ) key )
366             {
367                 case "" :
368                 {
369                     this.location = location;
370                     return;
371                 }
372                 case "connection" :
373                 {
374                     connectionLocation = location;
375                     return;
376                 }
377                 case "developerConnection" :
378                 {
379                     developerConnectionLocation = location;
380                     return;
381                 }
382                 case "tag" :
383                 {
384                     tagLocation = location;
385                     return;
386                 }
387                 case "url" :
388                 {
389                     urlLocation = location;
390                     return;
391                 }
392                 case "childScmConnectionInheritAppendPath" :
393                 {
394                     childScmConnectionInheritAppendPathLocation = location;
395                     return;
396                 }
397                 case "childScmDeveloperConnectionInheritAppendPath" :
398                 {
399                     childScmDeveloperConnectionInheritAppendPathLocation = location;
400                     return;
401                 }
402                 case "childScmUrlInheritAppendPath" :
403                 {
404                     childScmUrlInheritAppendPathLocation = location;
405                     return;
406                 }
407                 default :
408                 {
409                     setOtherLocation( key, location );
410                     return;
411                 }
412                 }
413             }
414             else
415             {
416                 setOtherLocation( key, location );
417             }
418     } //-- void setLocation( Object, InputLocation )
419 
420     /**
421      * 
422      * 
423      * @param key
424      * @param location
425      */
426     public void setOtherLocation( Object key, InputLocation location )
427     {
428         if ( location != null )
429         {
430             if ( this.locations == null )
431             {
432                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
433             }
434             this.locations.put( key, location );
435         }
436     } //-- void setOtherLocation( Object, InputLocation )
437 
438     /**
439      * 
440      * 
441      * @param key
442      * @return InputLocation
443      */
444     private InputLocation getOtherLocation( Object key )
445     {
446         return ( locations != null ) ? locations.get( key ) : null;
447     } //-- InputLocation getOtherLocation( Object )
448 
449     /**
450      * Get the tag of current code. By default, it's set to HEAD
451      * during development.
452      * 
453      * @return String
454      */
455     public String getTag()
456     {
457         return this.tag;
458     } //-- String getTag()
459 
460     /**
461      * Get the URL to the project's browsable SCM repository, such
462      * as ViewVC or Fisheye.
463      *             <br><b>Default value is</b>: parent value [+
464      * path adjustment] + (artifactId or project.directory
465      * property), or just parent value if
466      *             scm's
467      * <code>child.scm.url.inherit.append.path="false"</code>
468      * 
469      * @return String
470      */
471     public String getUrl()
472     {
473         return this.url;
474     } //-- String getUrl()
475 
476     /**
477      * Set when children inherit from scm connection, append path
478      * or not? Note: While the type
479      *             of this field is <code>String</code> for
480      * technical reasons, the semantic type is actually
481      *             <code>Boolean</code>
482      *             <br><b>Default value is</b>: <code>true</code>
483      *             <br><b>Since</b>: Maven 3.6.1.
484      * 
485      * @param childScmConnectionInheritAppendPath
486      */
487     public void setChildScmConnectionInheritAppendPath( String childScmConnectionInheritAppendPath )
488     {
489         this.childScmConnectionInheritAppendPath = childScmConnectionInheritAppendPath;
490     } //-- void setChildScmConnectionInheritAppendPath( String )
491 
492     /**
493      * Set when children inherit from scm developer connection,
494      * append path or not? Note: While the type
495      *             of this field is <code>String</code> for
496      * technical reasons, the semantic type is actually
497      *             <code>Boolean</code>
498      *             <br><b>Default value is</b>: <code>true</code>
499      *             <br><b>Since</b>: Maven 3.6.1.
500      * 
501      * @param childScmDeveloperConnectionInheritAppendPath
502      */
503     public void setChildScmDeveloperConnectionInheritAppendPath( String childScmDeveloperConnectionInheritAppendPath )
504     {
505         this.childScmDeveloperConnectionInheritAppendPath = childScmDeveloperConnectionInheritAppendPath;
506     } //-- void setChildScmDeveloperConnectionInheritAppendPath( String )
507 
508     /**
509      * Set when children inherit from scm url, append path or not?
510      * Note: While the type
511      *             of this field is <code>String</code> for
512      * technical reasons, the semantic type is actually
513      *             <code>Boolean</code>
514      *             <br><b>Default value is</b>: <code>true</code>
515      *             <br><b>Since</b>: Maven 3.6.1.
516      * 
517      * @param childScmUrlInheritAppendPath
518      */
519     public void setChildScmUrlInheritAppendPath( String childScmUrlInheritAppendPath )
520     {
521         this.childScmUrlInheritAppendPath = childScmUrlInheritAppendPath;
522     } //-- void setChildScmUrlInheritAppendPath( String )
523 
524     /**
525      * Set the source control management system URL
526      *             that describes the repository and how to connect
527      * to the
528      *             repository. For more information, see the
529      *             <a
530      * href="https://maven.apache.org/scm/scm-url-format.html">URL
531      * format</a>
532      *             and <a
533      * href="https://maven.apache.org/scm/scms-overview.html">list
534      * of supported SCMs</a>.
535      *             This connection is read-only.
536      *             <br><b>Default value is</b>: parent value [+
537      * path adjustment] + (artifactId or project.directory
538      * property), or just parent value if
539      *             scm's
540      * <code>child.scm.connection.inherit.append.path="false"</code>
541      * 
542      * @param connection
543      */
544     public void setConnection( String connection )
545     {
546         this.connection = connection;
547     } //-- void setConnection( String )
548 
549     /**
550      * Set just like <code>connection</code>, but for developers,
551      * i.e. this scm connection
552      *             will not be read only.
553      *             <br><b>Default value is</b>: parent value [+
554      * path adjustment] + (artifactId or project.directory
555      * property), or just parent value if
556      *             scm's
557      * <code>child.scm.developerConnection.inherit.append.path="false"</code>
558      * 
559      * @param developerConnection
560      */
561     public void setDeveloperConnection( String developerConnection )
562     {
563         this.developerConnection = developerConnection;
564     } //-- void setDeveloperConnection( String )
565 
566     /**
567      * Set the tag of current code. By default, it's set to HEAD
568      * during development.
569      * 
570      * @param tag
571      */
572     public void setTag( String tag )
573     {
574         this.tag = tag;
575     } //-- void setTag( String )
576 
577     /**
578      * Set the URL to the project's browsable SCM repository, such
579      * as ViewVC or Fisheye.
580      *             <br><b>Default value is</b>: parent value [+
581      * path adjustment] + (artifactId or project.directory
582      * property), or just parent value if
583      *             scm's
584      * <code>child.scm.url.inherit.append.path="false"</code>
585      * 
586      * @param url
587      */
588     public void setUrl( String url )
589     {
590         this.url = url;
591     } //-- void setUrl( String )
592 
593     
594             
595 
596     public boolean isChildScmConnectionInheritAppendPath()
597     {
598         return ( childScmConnectionInheritAppendPath != null ) ? Boolean.parseBoolean( childScmConnectionInheritAppendPath ) : true;
599     }
600 
601     public void setChildScmConnectionInheritAppendPath( boolean childScmConnectionInheritAppendPath )
602     {
603         this.childScmConnectionInheritAppendPath = String.valueOf( childScmConnectionInheritAppendPath );
604     }
605 
606     public boolean isChildScmDeveloperConnectionInheritAppendPath()
607     {
608         return ( childScmDeveloperConnectionInheritAppendPath != null ) ? Boolean.parseBoolean( childScmDeveloperConnectionInheritAppendPath ) : true;
609     }
610 
611     public void setChildScmDeveloperConnectionInheritAppendPath( boolean childScmDeveloperConnectionInheritAppendPath )
612     {
613         this.childScmDeveloperConnectionInheritAppendPath = String.valueOf( childScmDeveloperConnectionInheritAppendPath );
614     }
615 
616     public boolean isChildScmUrlInheritAppendPath()
617     {
618         return ( childScmUrlInheritAppendPath != null ) ? Boolean.parseBoolean( childScmUrlInheritAppendPath ) : true;
619     }
620 
621     public void setChildScmUrlInheritAppendPath( boolean childScmUrlInheritAppendPath )
622     {
623         this.childScmUrlInheritAppendPath = String.valueOf( childScmUrlInheritAppendPath );
624     }
625 
626             
627           
628     
629             
630     /**
631      * @see java.lang.Object#toString()
632      */
633     public String toString()
634     {
635         return "Scm {connection=" + connection + "}";
636     }
637             
638           
639 }