1 /*
2 * $Id$
3 */
4
5 package org.apache.maven.settings;
6
7 //---------------------------------/
8 //- Imported classes and packages -/
9 //---------------------------------/
10
11 import java.util.Date;
12
13 /**
14 *
15 *
16 * Repository contains the information needed
17 * for establishing connections with remote repoistory
18 *
19 * .
20 *
21 * @version $Revision$ $Date$
22 */
23 public class RepositoryBase implements java.io.Serializable {
24
25
26 //--------------------------/
27 //- Class/Member Variables -/
28 //--------------------------/
29
30 /**
31 *
32 *
33 * A unique identifier for a repository.
34 *
35 *
36 */
37 private String id;
38
39 /**
40 *
41 *
42 * Human readable name of the repository.
43 *
44 *
45 */
46 private String name;
47
48 /**
49 *
50 *
51 * The url of the repository.
52 *
53 *
54 */
55 private String url;
56
57 /**
58 *
59 * The type of layout this repository uses for
60 * locating and
61 * storing artifacts - can be "legacy" or
62 * "default".
63 *
64 */
65 private String layout = "default";
66
67
68 //-----------/
69 //- Methods -/
70 //-----------/
71
72 /**
73 * Get
74 *
75 * A unique identifier for a repository.
76 *
77 *
78 *
79 * @return String
80 */
81 public String getId()
82 {
83 return this.id;
84 } //-- String getId()
85
86 /**
87 * Get
88 * The type of layout this repository uses for
89 * locating and
90 * storing artifacts - can be "legacy" or
91 * "default".
92 *
93 *
94 * @return String
95 */
96 public String getLayout()
97 {
98 return this.layout;
99 } //-- String getLayout()
100
101 /**
102 * Get
103 *
104 * Human readable name of the repository.
105 *
106 *
107 *
108 * @return String
109 */
110 public String getName()
111 {
112 return this.name;
113 } //-- String getName()
114
115 /**
116 * Get
117 *
118 * The url of the repository.
119 *
120 *
121 *
122 * @return String
123 */
124 public String getUrl()
125 {
126 return this.url;
127 } //-- String getUrl()
128
129 /**
130 * Set
131 *
132 * A unique identifier for a repository.
133 *
134 *
135 *
136 * @param id
137 */
138 public void setId( String id )
139 {
140 this.id = id;
141 } //-- void setId( String )
142
143 /**
144 * Set
145 * The type of layout this repository uses for
146 * locating and
147 * storing artifacts - can be "legacy" or
148 * "default".
149 *
150 *
151 * @param layout
152 */
153 public void setLayout( String layout )
154 {
155 this.layout = layout;
156 } //-- void setLayout( String )
157
158 /**
159 * Set
160 *
161 * Human readable name of the repository.
162 *
163 *
164 *
165 * @param name
166 */
167 public void setName( String name )
168 {
169 this.name = name;
170 } //-- void setName( String )
171
172 /**
173 * Set
174 *
175 * The url of the repository.
176 *
177 *
178 *
179 * @param url
180 */
181 public void setUrl( String url )
182 {
183 this.url = url;
184 } //-- void setUrl( String )
185
186
187
188 /**
189 * @see java.lang.Object#equals(java.lang.Object)
190 */
191 public boolean equals( Object obj )
192 {
193 RepositoryBase other = (RepositoryBase) obj;
194
195 boolean retValue = false;
196
197 if ( id != null )
198 {
199 retValue = id.equals( other.id );
200 }
201
202 return retValue;
203 }
204
205
206 private String modelEncoding = "UTF-8";
207
208 /**
209 * Set an encoding used for reading/writing the model.
210 *
211 * @param modelEncoding the encoding used when reading/writing the model.
212 */
213 public void setModelEncoding( String modelEncoding )
214 {
215 this.modelEncoding = modelEncoding;
216 }
217
218 /**
219 * @return the current encoding used when reading/writing this model.
220 */
221 public String getModelEncoding()
222 {
223 return modelEncoding;
224 }
225 }