1
2
3
4
5 package org.apache.maven.settings;
6
7
8
9
10
11 import java.util.Date;
12
13
14
15
16
17
18
19
20
21
22
23
24 public class Profile extends IdentifiableBase
25 implements java.io.Serializable
26 {
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 private Activation activation;
42
43
44
45
46 private java.util.Properties properties;
47
48
49
50
51 private java.util.List repositories;
52
53
54
55
56
57
58
59
60
61
62
63 private java.util.List pluginRepositories;
64
65
66
67
68
69
70
71
72
73
74
75 public void addPluginRepository( Repository repository )
76 {
77 if ( !(repository instanceof Repository) )
78 {
79 throw new ClassCastException( "Profile.addPluginRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
80 }
81 getPluginRepositories().add( repository );
82 }
83
84
85
86
87
88
89
90 public void addProperty( String key, String value )
91 {
92 getProperties().put( key, value );
93 }
94
95
96
97
98
99
100 public void addRepository( Repository repository )
101 {
102 if ( !(repository instanceof Repository) )
103 {
104 throw new ClassCastException( "Profile.addRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
105 }
106 getRepositories().add( repository );
107 }
108
109
110
111
112
113
114
115
116
117
118
119 public Activation getActivation()
120 {
121 return this.activation;
122 }
123
124
125
126
127
128
129 public java.util.List getPluginRepositories()
130 {
131 if ( this.pluginRepositories == null )
132 {
133 this.pluginRepositories = new java.util.ArrayList();
134 }
135
136 return this.pluginRepositories;
137 }
138
139
140
141
142
143
144 public java.util.Properties getProperties()
145 {
146 if ( this.properties == null )
147 {
148 this.properties = new java.util.Properties();
149 }
150
151 return this.properties;
152 }
153
154
155
156
157
158
159 public java.util.List getRepositories()
160 {
161 if ( this.repositories == null )
162 {
163 this.repositories = new java.util.ArrayList();
164 }
165
166 return this.repositories;
167 }
168
169
170
171
172
173
174 public void removePluginRepository( Repository repository )
175 {
176 if ( !(repository instanceof Repository) )
177 {
178 throw new ClassCastException( "Profile.removePluginRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
179 }
180 getPluginRepositories().remove( repository );
181 }
182
183
184
185
186
187
188 public void removeRepository( Repository repository )
189 {
190 if ( !(repository instanceof Repository) )
191 {
192 throw new ClassCastException( "Profile.removeRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
193 }
194 getRepositories().remove( repository );
195 }
196
197
198
199
200
201
202
203
204
205
206
207 public void setActivation( Activation activation )
208 {
209 this.activation = activation;
210 }
211
212
213
214
215
216
217
218
219
220
221
222 public void setPluginRepositories( java.util.List pluginRepositories )
223 {
224 this.pluginRepositories = pluginRepositories;
225 }
226
227
228
229
230
231
232
233
234
235
236
237 public void setProperties( java.util.Properties properties )
238 {
239 this.properties = properties;
240 }
241
242
243
244
245
246
247
248
249
250
251 public void setRepositories( java.util.List repositories )
252 {
253 this.repositories = repositories;
254 }
255
256
257 private String modelEncoding = "UTF-8";
258
259
260
261
262
263
264 public void setModelEncoding( String modelEncoding )
265 {
266 this.modelEncoding = modelEncoding;
267 }
268
269
270
271
272 public String getModelEncoding()
273 {
274 return modelEncoding;
275 }
276 }