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