Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Scm |
|
| 1.0;1 |
1 | /* | |
2 | * $Id$ | |
3 | */ | |
4 | ||
5 | package org.apache.maven.model; | |
6 | ||
7 | //---------------------------------/ | |
8 | //- Imported classes and packages -/ | |
9 | //---------------------------------/ | |
10 | ||
11 | import java.util.Date; | |
12 | ||
13 | /** | |
14 | * | |
15 | * | |
16 | * The <code><scm></code> element contains | |
17 | * informations required to the SCM | |
18 | * (Source Control Management) of the project. | |
19 | * | |
20 | * | |
21 | * | |
22 | * @version $Revision$ $Date$ | |
23 | */ | |
24 | 0 | public class Scm implements java.io.Serializable { |
25 | ||
26 | ||
27 | //--------------------------/ | |
28 | //- Class/Member Variables -/ | |
29 | //--------------------------/ | |
30 | ||
31 | /** | |
32 | * | |
33 | * | |
34 | * The source control management system URL | |
35 | * that describes the repository and how to connect | |
36 | * to the | |
37 | * repository. For more information, see the | |
38 | * <a | |
39 | * href="http://maven.apache.org/scm/scm-url-format.html">URL | |
40 | * format</a> | |
41 | * and <a | |
42 | * href="http://maven.apache.org/scm/scms-overview.html">list | |
43 | * of supported SCMs</a>. | |
44 | * This connection is read-only. | |
45 | * | |
46 | * | |
47 | */ | |
48 | private String connection; | |
49 | ||
50 | /** | |
51 | * | |
52 | * | |
53 | * Just like <code>connection</code>, but for | |
54 | * developers, i.e. this scm connection | |
55 | * will not be read only. | |
56 | * | |
57 | * | |
58 | */ | |
59 | private String developerConnection; | |
60 | ||
61 | /** | |
62 | * The tag of current code. By default, it's set to HEAD during | |
63 | * development. | |
64 | */ | |
65 | 0 | private String tag = "HEAD"; |
66 | ||
67 | /** | |
68 | * The URL to the project's browsable SCM repository, such as | |
69 | * ViewVC or Fisheye. | |
70 | */ | |
71 | private String url; | |
72 | ||
73 | ||
74 | //-----------/ | |
75 | //- Methods -/ | |
76 | //-----------/ | |
77 | ||
78 | /** | |
79 | * Get | |
80 | * | |
81 | * The source control management system URL | |
82 | * that describes the repository and how to connect | |
83 | * to the | |
84 | * repository. For more information, see the | |
85 | * <a | |
86 | * href="http://maven.apache.org/scm/scm-url-format.html">URL | |
87 | * format</a> | |
88 | * and <a | |
89 | * href="http://maven.apache.org/scm/scms-overview.html">list | |
90 | * of supported SCMs</a>. | |
91 | * This connection is read-only. | |
92 | * | |
93 | * | |
94 | * | |
95 | * @return String | |
96 | */ | |
97 | public String getConnection() | |
98 | { | |
99 | 0 | return this.connection; |
100 | } //-- String getConnection() | |
101 | ||
102 | /** | |
103 | * Get | |
104 | * | |
105 | * Just like <code>connection</code>, but for | |
106 | * developers, i.e. this scm connection | |
107 | * will not be read only. | |
108 | * | |
109 | * | |
110 | * | |
111 | * @return String | |
112 | */ | |
113 | public String getDeveloperConnection() | |
114 | { | |
115 | 0 | return this.developerConnection; |
116 | } //-- String getDeveloperConnection() | |
117 | ||
118 | /** | |
119 | * Get the tag of current code. By default, it's set to HEAD | |
120 | * during development. | |
121 | * | |
122 | * @return String | |
123 | */ | |
124 | public String getTag() | |
125 | { | |
126 | 0 | return this.tag; |
127 | } //-- String getTag() | |
128 | ||
129 | /** | |
130 | * Get the URL to the project's browsable SCM repository, such | |
131 | * as ViewVC or Fisheye. | |
132 | * | |
133 | * @return String | |
134 | */ | |
135 | public String getUrl() | |
136 | { | |
137 | 0 | return this.url; |
138 | } //-- String getUrl() | |
139 | ||
140 | /** | |
141 | * Set | |
142 | * | |
143 | * The source control management system URL | |
144 | * that describes the repository and how to connect | |
145 | * to the | |
146 | * repository. For more information, see the | |
147 | * <a | |
148 | * href="http://maven.apache.org/scm/scm-url-format.html">URL | |
149 | * format</a> | |
150 | * and <a | |
151 | * href="http://maven.apache.org/scm/scms-overview.html">list | |
152 | * of supported SCMs</a>. | |
153 | * This connection is read-only. | |
154 | * | |
155 | * | |
156 | * | |
157 | * @param connection | |
158 | */ | |
159 | public void setConnection( String connection ) | |
160 | { | |
161 | 0 | this.connection = connection; |
162 | 0 | } //-- void setConnection( String ) |
163 | ||
164 | /** | |
165 | * Set | |
166 | * | |
167 | * Just like <code>connection</code>, but for | |
168 | * developers, i.e. this scm connection | |
169 | * will not be read only. | |
170 | * | |
171 | * | |
172 | * | |
173 | * @param developerConnection | |
174 | */ | |
175 | public void setDeveloperConnection( String developerConnection ) | |
176 | { | |
177 | 0 | this.developerConnection = developerConnection; |
178 | 0 | } //-- void setDeveloperConnection( String ) |
179 | ||
180 | /** | |
181 | * Set the tag of current code. By default, it's set to HEAD | |
182 | * during development. | |
183 | * | |
184 | * @param tag | |
185 | */ | |
186 | public void setTag( String tag ) | |
187 | { | |
188 | 0 | this.tag = tag; |
189 | 0 | } //-- void setTag( String ) |
190 | ||
191 | /** | |
192 | * Set the URL to the project's browsable SCM repository, such | |
193 | * as ViewVC or Fisheye. | |
194 | * | |
195 | * @param url | |
196 | */ | |
197 | public void setUrl( String url ) | |
198 | { | |
199 | 0 | this.url = url; |
200 | 0 | } //-- void setUrl( String ) |
201 | ||
202 | ||
203 | 0 | private String modelEncoding = "UTF-8"; |
204 | ||
205 | /** | |
206 | * Set an encoding used for reading/writing the model. | |
207 | * | |
208 | * @param modelEncoding the encoding used when reading/writing the model. | |
209 | */ | |
210 | public void setModelEncoding( String modelEncoding ) | |
211 | { | |
212 | 0 | this.modelEncoding = modelEncoding; |
213 | 0 | } |
214 | ||
215 | /** | |
216 | * @return the current encoding used when reading/writing this model. | |
217 | */ | |
218 | public String getModelEncoding() | |
219 | { | |
220 | 0 | return modelEncoding; |
221 | } | |
222 | } |