001// =================== DO NOT EDIT THIS FILE ====================
002// Generated by Modello 1.8.3,
003// any modifications will be overwritten.
004// ==============================================================
005
006package org.apache.maven.settings;
007
008/**
009 * 
010 *         
011 *         Modifications to the build process which is keyed on
012 * some
013 *         sort of environmental parameter.
014 *         
015 *       
016 * 
017 * @version $Revision: 965443 $ $Date: 2015-09-14 22:18:52 +0000 (Mon, 14 Sep 2015) $
018 */
019@SuppressWarnings( "all" )
020public class Profile
021    extends IdentifiableBase
022    implements java.io.Serializable, java.lang.Cloneable
023{
024
025      //--------------------------/
026     //- Class/Member Variables -/
027    //--------------------------/
028
029    /**
030     * 
031     *             
032     *             The conditional logic which will automatically
033     *             trigger the inclusion of this profile.
034     *             
035     *           
036     */
037    private Activation activation;
038
039    /**
040     * Field properties.
041     */
042    private java.util.Properties properties;
043
044    /**
045     * Field repositories.
046     */
047    private java.util.List<Repository> repositories;
048
049    /**
050     * 
051     *             
052     *             This may be removed or relocated in the near
053     *             future. It is undecided whether plugins really
054     * need a remote
055     *             repository set of their own.
056     *             
057     *           
058     */
059    private java.util.List<Repository> pluginRepositories;
060
061
062      //-----------/
063     //- Methods -/
064    //-----------/
065
066    /**
067     * Method addPluginRepository.
068     * 
069     * @param repository
070     */
071    public void addPluginRepository( Repository repository )
072    {
073        getPluginRepositories().add( repository );
074    } //-- void addPluginRepository( Repository )
075
076    /**
077     * Method addProperty.
078     * 
079     * @param key
080     * @param value
081     */
082    public void addProperty( String key, String value )
083    {
084        getProperties().put( key, value );
085    } //-- void addProperty( String, String )
086
087    /**
088     * Method addRepository.
089     * 
090     * @param repository
091     */
092    public void addRepository( Repository repository )
093    {
094        getRepositories().add( repository );
095    } //-- void addRepository( Repository )
096
097    /**
098     * Method clone.
099     * 
100     * @return Profile
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    } //-- Profile clone()
144
145    /**
146     * Get the conditional logic which will automatically
147     *             trigger the inclusion of this profile.
148     * 
149     * @return Activation
150     */
151    public Activation getActivation()
152    {
153        return this.activation;
154    } //-- Activation getActivation()
155
156    /**
157     * Method getPluginRepositories.
158     * 
159     * @return List
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    } //-- java.util.List<Repository> getPluginRepositories()
170
171    /**
172     * Method getProperties.
173     * 
174     * @return Properties
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    } //-- java.util.Properties getProperties()
185
186    /**
187     * Method getRepositories.
188     * 
189     * @return List
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    } //-- java.util.List<Repository> getRepositories()
200
201    /**
202     * Method removePluginRepository.
203     * 
204     * @param repository
205     */
206    public void removePluginRepository( Repository repository )
207    {
208        getPluginRepositories().remove( repository );
209    } //-- void removePluginRepository( Repository )
210
211    /**
212     * Method removeRepository.
213     * 
214     * @param repository
215     */
216    public void removeRepository( Repository repository )
217    {
218        getRepositories().remove( repository );
219    } //-- void removeRepository( Repository )
220
221    /**
222     * Set the conditional logic which will automatically
223     *             trigger the inclusion of this profile.
224     * 
225     * @param activation
226     */
227    public void setActivation( Activation activation )
228    {
229        this.activation = activation;
230    } //-- void setActivation( Activation )
231
232    /**
233     * Set the lists of the remote repositories for discovering
234     * plugins.
235     * 
236     * @param pluginRepositories
237     */
238    public void setPluginRepositories( java.util.List<Repository> pluginRepositories )
239    {
240        this.pluginRepositories = pluginRepositories;
241    } //-- void setPluginRepositories( java.util.List )
242
243    /**
244     * Set extended configuration specific to this profile goes
245     * here.
246     *             Contents take the form of
247     *            
248     * <code>&lt;property.name&gt;property.value&lt;/property.name&gt;</code>
249     * 
250     * @param properties
251     */
252    public void setProperties( java.util.Properties properties )
253    {
254        this.properties = properties;
255    } //-- void setProperties( java.util.Properties )
256
257    /**
258     * Set the lists of the remote repositories.
259     * 
260     * @param repositories
261     */
262    public void setRepositories( java.util.List<Repository> repositories )
263    {
264        this.repositories = repositories;
265    } //-- void setRepositories( java.util.List )
266
267}