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