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 public class Profile
22 extends IdentifiableBase
23 implements java.io.Serializable
24 {
25
26
27
28
29
30
31
32
33
34
35
36
37
38 private Activation activation;
39
40
41
42
43 private java.util.Properties properties;
44
45
46
47
48 private java.util.List<Repository> repositories;
49
50
51
52
53
54
55
56
57
58
59
60 private java.util.List<Repository> pluginRepositories;
61
62
63
64
65
66
67
68
69
70
71
72 public void addPluginRepository( Repository repository )
73 {
74 if ( !(repository instanceof Repository) )
75 {
76 throw new ClassCastException( "Profile.addPluginRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
77 }
78 getPluginRepositories().add( repository );
79 }
80
81
82
83
84
85
86
87 public void addProperty( String key, String value )
88 {
89 getProperties().put( key, value );
90 }
91
92
93
94
95
96
97 public void addRepository( Repository repository )
98 {
99 if ( !(repository instanceof Repository) )
100 {
101 throw new ClassCastException( "Profile.addRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
102 }
103 getRepositories().add( repository );
104 }
105
106
107
108
109
110
111
112 public Activation getActivation()
113 {
114 return this.activation;
115 }
116
117
118
119
120
121
122 public java.util.List<Repository> getPluginRepositories()
123 {
124 if ( this.pluginRepositories == null )
125 {
126 this.pluginRepositories = new java.util.ArrayList<Repository>();
127 }
128
129 return this.pluginRepositories;
130 }
131
132
133
134
135
136
137 public java.util.Properties getProperties()
138 {
139 if ( this.properties == null )
140 {
141 this.properties = new java.util.Properties();
142 }
143
144 return this.properties;
145 }
146
147
148
149
150
151
152 public java.util.List<Repository> getRepositories()
153 {
154 if ( this.repositories == null )
155 {
156 this.repositories = new java.util.ArrayList<Repository>();
157 }
158
159 return this.repositories;
160 }
161
162
163
164
165
166
167 public void removePluginRepository( Repository repository )
168 {
169 if ( !(repository instanceof Repository) )
170 {
171 throw new ClassCastException( "Profile.removePluginRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
172 }
173 getPluginRepositories().remove( repository );
174 }
175
176
177
178
179
180
181 public void removeRepository( Repository repository )
182 {
183 if ( !(repository instanceof Repository) )
184 {
185 throw new ClassCastException( "Profile.removeRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
186 }
187 getRepositories().remove( repository );
188 }
189
190
191
192
193
194
195
196 public void setActivation( Activation activation )
197 {
198 this.activation = activation;
199 }
200
201
202
203
204
205
206
207 public void setPluginRepositories( java.util.List<Repository> pluginRepositories )
208 {
209 this.pluginRepositories = pluginRepositories;
210 }
211
212
213
214
215
216
217
218
219
220 public void setProperties( java.util.Properties properties )
221 {
222 this.properties = properties;
223 }
224
225
226
227
228
229
230 public void setRepositories( java.util.List<Repository> repositories )
231 {
232 this.repositories = repositories;
233 }
234
235
236 }