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