View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2013-02-24 03:31:02,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.model;
9   
10  /**
11   * 
12   *         
13   *         The <code>&lt;scm&gt;</code> element contains
14   * informations required to the SCM
15   *         (Source Control Management) of the project.
16   *         
17   *       
18   * 
19   * @version $Revision$ $Date$
20   */
21  @SuppressWarnings( "all" )
22  public class Scm
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 source control management system URL
34       *             that describes the repository and how to connect
35       * to the
36       *             repository. For more information, see the
37       *             <a
38       * href="http://maven.apache.org/scm/scm-url-format.html">URL
39       * format</a>
40       *             and <a
41       * href="http://maven.apache.org/scm/scms-overview.html">list
42       * of supported SCMs</a>.
43       *             This connection is read-only.
44       *             
45       *           
46       */
47      private String connection;
48  
49      /**
50       * 
51       *             
52       *             Just like <code>connection</code>, but for
53       * developers, i.e. this scm connection
54       *             will not be read only.
55       *             
56       *           
57       */
58      private String developerConnection;
59  
60      /**
61       * The tag of current code. By default, it's set to HEAD during
62       * development.
63       */
64      private String tag = "HEAD";
65  
66      /**
67       * The URL to the project's browsable SCM repository, such as
68       * ViewVC or Fisheye.
69       */
70      private String url;
71  
72      /**
73       * Field locations.
74       */
75      private java.util.Map<Object, InputLocation> locations;
76  
77  
78        //-----------/
79       //- Methods -/
80      //-----------/
81  
82      /**
83       * Method clone.
84       * 
85       * @return Scm
86       */
87      public Scm clone()
88      {
89          try
90          {
91              Scm copy = (Scm) super.clone();
92  
93              if ( copy.locations != null )
94              {
95                  copy.locations = new java.util.LinkedHashMap( copy.locations );
96              }
97  
98              return copy;
99          }
100         catch ( java.lang.Exception ex )
101         {
102             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
103                 + " does not support clone()" ).initCause( ex );
104         }
105     } //-- Scm clone()
106 
107     /**
108      * Get the source control management system URL
109      *             that describes the repository and how to connect
110      * to the
111      *             repository. For more information, see the
112      *             <a
113      * href="http://maven.apache.org/scm/scm-url-format.html">URL
114      * format</a>
115      *             and <a
116      * href="http://maven.apache.org/scm/scms-overview.html">list
117      * of supported SCMs</a>.
118      *             This connection is read-only.
119      * 
120      * @return String
121      */
122     public String getConnection()
123     {
124         return this.connection;
125     } //-- String getConnection()
126 
127     /**
128      * Get just like <code>connection</code>, but for developers,
129      * i.e. this scm connection
130      *             will not be read only.
131      * 
132      * @return String
133      */
134     public String getDeveloperConnection()
135     {
136         return this.developerConnection;
137     } //-- String getDeveloperConnection()
138 
139     /**
140      * 
141      * 
142      * @param key
143      * @return InputLocation
144      */
145     public InputLocation getLocation( Object key )
146     {
147         return ( locations != null ) ? locations.get( key ) : null;
148     } //-- InputLocation getLocation( Object )
149 
150     /**
151      * Get the tag of current code. By default, it's set to HEAD
152      * during development.
153      * 
154      * @return String
155      */
156     public String getTag()
157     {
158         return this.tag;
159     } //-- String getTag()
160 
161     /**
162      * Get the URL to the project's browsable SCM repository, such
163      * as ViewVC or Fisheye.
164      * 
165      * @return String
166      */
167     public String getUrl()
168     {
169         return this.url;
170     } //-- String getUrl()
171 
172     /**
173      * Set the source control management system URL
174      *             that describes the repository and how to connect
175      * to the
176      *             repository. For more information, see the
177      *             <a
178      * href="http://maven.apache.org/scm/scm-url-format.html">URL
179      * format</a>
180      *             and <a
181      * href="http://maven.apache.org/scm/scms-overview.html">list
182      * of supported SCMs</a>.
183      *             This connection is read-only.
184      * 
185      * @param connection
186      */
187     public void setConnection( String connection )
188     {
189         this.connection = connection;
190     } //-- void setConnection( String )
191 
192     /**
193      * Set just like <code>connection</code>, but for developers,
194      * i.e. this scm connection
195      *             will not be read only.
196      * 
197      * @param developerConnection
198      */
199     public void setDeveloperConnection( String developerConnection )
200     {
201         this.developerConnection = developerConnection;
202     } //-- void setDeveloperConnection( String )
203 
204     /**
205      * 
206      * 
207      * @param key
208      * @param location
209      */
210     public void setLocation( Object key, InputLocation location )
211     {
212         if ( location != null )
213         {
214             if ( this.locations == null )
215             {
216                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
217             }
218             this.locations.put( key, location );
219         }
220     } //-- void setLocation( Object, InputLocation )
221 
222     /**
223      * Set the tag of current code. By default, it's set to HEAD
224      * during development.
225      * 
226      * @param tag
227      */
228     public void setTag( String tag )
229     {
230         this.tag = tag;
231     } //-- void setTag( String )
232 
233     /**
234      * Set the URL to the project's browsable SCM repository, such
235      * as ViewVC or Fisheye.
236      * 
237      * @param url
238      */
239     public void setUrl( String url )
240     {
241         this.url = url;
242     } //-- void setUrl( String )
243 
244 }