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