1
2
3
4
5
6
7
8 package org.apache.maven.settings;
9
10
11
12
13
14
15
16
17
18
19
20
21 @SuppressWarnings( "all" )
22 public class Profile
23 extends IdentifiableBase
24 implements java.io.Serializable, java.lang.Cloneable
25 {
26
27
28
29
30
31
32
33
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<Repository> repositories;
50
51
52
53
54
55
56
57
58
59
60
61 private java.util.List<Repository> pluginRepositories;
62
63
64
65
66
67
68
69
70
71
72
73 public void addPluginRepository( Repository repository )
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 getRepositories().add( repository );
97 }
98
99
100
101
102
103
104 public Profile clone()
105 {
106 try
107 {
108 Profile copy = (Profile) super.clone();
109
110 if ( this.activation != null )
111 {
112 copy.activation = (Activation) this.activation.clone();
113 }
114
115 if ( this.properties != null )
116 {
117 copy.properties = (java.util.Properties) this.properties.clone();
118 }
119
120 if ( this.repositories != null )
121 {
122 copy.repositories = new java.util.ArrayList<Repository>();
123 for ( Repository item : this.repositories )
124 {
125 copy.repositories.add( ( (Repository) item).clone() );
126 }
127 }
128
129 if ( this.pluginRepositories != null )
130 {
131 copy.pluginRepositories = new java.util.ArrayList<Repository>();
132 for ( Repository item : this.pluginRepositories )
133 {
134 copy.pluginRepositories.add( ( (Repository) item).clone() );
135 }
136 }
137
138 return copy;
139 }
140 catch ( java.lang.Exception ex )
141 {
142 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
143 + " does not support clone()" ).initCause( ex );
144 }
145 }
146
147
148
149
150
151
152
153 public Activation getActivation()
154 {
155 return this.activation;
156 }
157
158
159
160
161
162
163 public java.util.List<Repository> getPluginRepositories()
164 {
165 if ( this.pluginRepositories == null )
166 {
167 this.pluginRepositories = new java.util.ArrayList<Repository>();
168 }
169
170 return this.pluginRepositories;
171 }
172
173
174
175
176
177
178 public java.util.Properties getProperties()
179 {
180 if ( this.properties == null )
181 {
182 this.properties = new java.util.Properties();
183 }
184
185 return this.properties;
186 }
187
188
189
190
191
192
193 public java.util.List<Repository> getRepositories()
194 {
195 if ( this.repositories == null )
196 {
197 this.repositories = new java.util.ArrayList<Repository>();
198 }
199
200 return this.repositories;
201 }
202
203
204
205
206
207
208 public void removePluginRepository( Repository repository )
209 {
210 getPluginRepositories().remove( repository );
211 }
212
213
214
215
216
217
218 public void removeRepository( Repository repository )
219 {
220 getRepositories().remove( repository );
221 }
222
223
224
225
226
227
228
229 public void setActivation( Activation activation )
230 {
231 this.activation = activation;
232 }
233
234
235
236
237
238
239
240 public void setPluginRepositories( java.util.List<Repository> pluginRepositories )
241 {
242 this.pluginRepositories = pluginRepositories;
243 }
244
245
246
247
248
249
250
251
252
253 public void setProperties( java.util.Properties properties )
254 {
255 this.properties = properties;
256 }
257
258
259
260
261
262
263 public void setRepositories( java.util.List<Repository> repositories )
264 {
265 this.repositories = repositories;
266 }
267
268 }