1 /*
2 =================== DO NOT EDIT THIS FILE ====================
3 Generated by Modello 1.0.1 on 2009-09-09 03:30:24,
4 any modifications will be overwritten.
5 ==============================================================
6 */
7
8 package org.apache.maven.profiles;
9
10 /**
11 *
12 * Modifications to the build process which is keyed on
13 * some
14 * sort of environmental parameter.
15 *
16 *
17 * @version $Revision$ $Date$
18 */
19 public class Profile
20 implements java.io.Serializable
21 {
22
23 //--------------------------/
24 //- Class/Member Variables -/
25 //--------------------------/
26
27 /**
28 * The ID of this build profile, for activation
29 * purposes.
30 */
31 private String id;
32
33 /**
34 * The conditional logic which will automatically
35 * trigger the inclusion of this profile.
36 */
37 private Activation activation;
38
39 /**
40 * Field properties.
41 */
42 private java.util.Properties properties;
43
44 /**
45 * Field repositories.
46 */
47 private java.util.List<Repository> repositories;
48
49 /**
50 * This may be removed or relocated in the near
51 * future. It is undecided whether plugins really
52 * need a remote
53 * repository set of their own.
54 */
55 private java.util.List<Repository> pluginRepositories;
56
57
58 //-----------/
59 //- Methods -/
60 //-----------/
61
62 /**
63 * Method addPluginRepository.
64 *
65 * @param repository
66 */
67 public void addPluginRepository( Repository repository )
68 {
69 if ( !(repository instanceof Repository) )
70 {
71 throw new ClassCastException( "Profile.addPluginRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
72 }
73 getPluginRepositories().add( repository );
74 } //-- void addPluginRepository( Repository )
75
76 /**
77 * Method addProperty.
78 *
79 * @param key
80 * @param value
81 */
82 public void addProperty( String key, String value )
83 {
84 getProperties().put( key, value );
85 } //-- void addProperty( String, String )
86
87 /**
88 * Method addRepository.
89 *
90 * @param repository
91 */
92 public void addRepository( Repository repository )
93 {
94 if ( !(repository instanceof Repository) )
95 {
96 throw new ClassCastException( "Profile.addRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
97 }
98 getRepositories().add( repository );
99 } //-- void addRepository( Repository )
100
101 /**
102 * Get the conditional logic which will automatically
103 * trigger the inclusion of this profile.
104 *
105 * @return Activation
106 */
107 public Activation getActivation()
108 {
109 return this.activation;
110 } //-- Activation getActivation()
111
112 /**
113 * Get the ID of this build profile, for activation
114 * purposes.
115 *
116 * @return String
117 */
118 public String getId()
119 {
120 return this.id;
121 } //-- String getId()
122
123 /**
124 * Method getPluginRepositories.
125 *
126 * @return List
127 */
128 public java.util.List<Repository> getPluginRepositories()
129 {
130 if ( this.pluginRepositories == null )
131 {
132 this.pluginRepositories = new java.util.ArrayList<Repository>();
133 }
134
135 return this.pluginRepositories;
136 } //-- java.util.List<Repository> getPluginRepositories()
137
138 /**
139 * Method getProperties.
140 *
141 * @return Properties
142 */
143 public java.util.Properties getProperties()
144 {
145 if ( this.properties == null )
146 {
147 this.properties = new java.util.Properties();
148 }
149
150 return this.properties;
151 } //-- java.util.Properties getProperties()
152
153 /**
154 * Method getRepositories.
155 *
156 * @return List
157 */
158 public java.util.List<Repository> getRepositories()
159 {
160 if ( this.repositories == null )
161 {
162 this.repositories = new java.util.ArrayList<Repository>();
163 }
164
165 return this.repositories;
166 } //-- java.util.List<Repository> getRepositories()
167
168 /**
169 * Method removePluginRepository.
170 *
171 * @param repository
172 */
173 public void removePluginRepository( Repository repository )
174 {
175 if ( !(repository instanceof Repository) )
176 {
177 throw new ClassCastException( "Profile.removePluginRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
178 }
179 getPluginRepositories().remove( repository );
180 } //-- void removePluginRepository( Repository )
181
182 /**
183 * Method removeRepository.
184 *
185 * @param repository
186 */
187 public void removeRepository( Repository repository )
188 {
189 if ( !(repository instanceof Repository) )
190 {
191 throw new ClassCastException( "Profile.removeRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
192 }
193 getRepositories().remove( repository );
194 } //-- void removeRepository( Repository )
195
196 /**
197 * Set the conditional logic which will automatically
198 * trigger the inclusion of this profile.
199 *
200 * @param activation
201 */
202 public void setActivation( Activation activation )
203 {
204 this.activation = activation;
205 } //-- void setActivation( Activation )
206
207 /**
208 * Set the ID of this build profile, for activation
209 * purposes.
210 *
211 * @param id
212 */
213 public void setId( String id )
214 {
215 this.id = id;
216 } //-- void setId( String )
217
218 /**
219 * Set the lists of the remote repositories for discovering
220 * plugins.
221 *
222 * @param pluginRepositories
223 */
224 public void setPluginRepositories( java.util.List<Repository> pluginRepositories )
225 {
226 this.pluginRepositories = pluginRepositories;
227 } //-- void setPluginRepositories( java.util.List )
228
229 /**
230 * Set extended configuration specific to this profile goes
231 * here.
232 *
233 * @param properties
234 */
235 public void setProperties( java.util.Properties properties )
236 {
237 this.properties = properties;
238 } //-- void setProperties( java.util.Properties )
239
240 /**
241 * Set the lists of the remote repositories.
242 *
243 * @param repositories
244 */
245 public void setRepositories( java.util.List<Repository> repositories )
246 {
247 this.repositories = repositories;
248 } //-- void setRepositories( java.util.List )
249
250
251 }