001    /*
002     =================== DO NOT EDIT THIS FILE ====================
003     Generated by Modello 1.4.1 on 2013-02-24 03:31:03,
004     any modifications will be overwritten.
005     ==============================================================
006     */
007    
008    package org.apache.maven.settings;
009    
010    /**
011     * 
012     *         
013     *         Modifications to the build process which is keyed on
014     * some
015     *         sort of environmental parameter.
016     *         
017     *       
018     * 
019     * @version $Revision$ $Date$
020     */
021    @SuppressWarnings( "all" )
022    public class Profile
023        extends IdentifiableBase
024        implements java.io.Serializable, java.lang.Cloneable
025    {
026    
027          //--------------------------/
028         //- Class/Member Variables -/
029        //--------------------------/
030    
031        /**
032         * 
033         *             
034         *             The conditional logic which will automatically
035         *             trigger the inclusion of this profile.
036         *             
037         *           
038         */
039        private Activation activation;
040    
041        /**
042         * Field properties.
043         */
044        private java.util.Properties properties;
045    
046        /**
047         * Field repositories.
048         */
049        private java.util.List<Repository> repositories;
050    
051        /**
052         * 
053         *             
054         *             This may be removed or relocated in the near
055         *             future. It is undecided whether plugins really
056         * need a remote
057         *             repository set of their own.
058         *             
059         *           
060         */
061        private java.util.List<Repository> pluginRepositories;
062    
063    
064          //-----------/
065         //- Methods -/
066        //-----------/
067    
068        /**
069         * Method addPluginRepository.
070         * 
071         * @param repository
072         */
073        public void addPluginRepository( Repository repository )
074        {
075            getPluginRepositories().add( repository );
076        } //-- void addPluginRepository( Repository )
077    
078        /**
079         * Method addProperty.
080         * 
081         * @param key
082         * @param value
083         */
084        public void addProperty( String key, String value )
085        {
086            getProperties().put( key, value );
087        } //-- void addProperty( String, String )
088    
089        /**
090         * Method addRepository.
091         * 
092         * @param repository
093         */
094        public void addRepository( Repository repository )
095        {
096            getRepositories().add( repository );
097        } //-- void addRepository( Repository )
098    
099        /**
100         * Method clone.
101         * 
102         * @return Profile
103         */
104        public Profile clone()
105        {
106            try
107            {
108                Profile copy = (Profile) super.clone();
109    
110                if ( this.activation != null )
111                {
112                    copy.activation = (Activation) this.activation.clone();
113                }
114    
115                if ( this.properties != null )
116                {
117                    copy.properties = (java.util.Properties) this.properties.clone();
118                }
119    
120                if ( this.repositories != null )
121                {
122                    copy.repositories = new java.util.ArrayList<Repository>();
123                    for ( Repository item : this.repositories )
124                    {
125                        copy.repositories.add( ( (Repository) item).clone() );
126                    }
127                }
128    
129                if ( this.pluginRepositories != null )
130                {
131                    copy.pluginRepositories = new java.util.ArrayList<Repository>();
132                    for ( Repository item : this.pluginRepositories )
133                    {
134                        copy.pluginRepositories.add( ( (Repository) item).clone() );
135                    }
136                }
137    
138                return copy;
139            }
140            catch ( java.lang.Exception ex )
141            {
142                throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
143                    + " does not support clone()" ).initCause( ex );
144            }
145        } //-- Profile clone()
146    
147        /**
148         * Get the conditional logic which will automatically
149         *             trigger the inclusion of this profile.
150         * 
151         * @return Activation
152         */
153        public Activation getActivation()
154        {
155            return this.activation;
156        } //-- Activation getActivation()
157    
158        /**
159         * Method getPluginRepositories.
160         * 
161         * @return List
162         */
163        public java.util.List<Repository> getPluginRepositories()
164        {
165            if ( this.pluginRepositories == null )
166            {
167                this.pluginRepositories = new java.util.ArrayList<Repository>();
168            }
169    
170            return this.pluginRepositories;
171        } //-- java.util.List<Repository> getPluginRepositories()
172    
173        /**
174         * Method getProperties.
175         * 
176         * @return Properties
177         */
178        public java.util.Properties getProperties()
179        {
180            if ( this.properties == null )
181            {
182                this.properties = new java.util.Properties();
183            }
184    
185            return this.properties;
186        } //-- java.util.Properties getProperties()
187    
188        /**
189         * Method getRepositories.
190         * 
191         * @return List
192         */
193        public java.util.List<Repository> getRepositories()
194        {
195            if ( this.repositories == null )
196            {
197                this.repositories = new java.util.ArrayList<Repository>();
198            }
199    
200            return this.repositories;
201        } //-- java.util.List<Repository> getRepositories()
202    
203        /**
204         * Method removePluginRepository.
205         * 
206         * @param repository
207         */
208        public void removePluginRepository( Repository repository )
209        {
210            getPluginRepositories().remove( repository );
211        } //-- void removePluginRepository( Repository )
212    
213        /**
214         * Method removeRepository.
215         * 
216         * @param repository
217         */
218        public void removeRepository( Repository repository )
219        {
220            getRepositories().remove( repository );
221        } //-- void removeRepository( Repository )
222    
223        /**
224         * Set the conditional logic which will automatically
225         *             trigger the inclusion of this profile.
226         * 
227         * @param activation
228         */
229        public void setActivation( Activation activation )
230        {
231            this.activation = activation;
232        } //-- void setActivation( Activation )
233    
234        /**
235         * Set the lists of the remote repositories for discovering
236         * plugins.
237         * 
238         * @param pluginRepositories
239         */
240        public void setPluginRepositories( java.util.List<Repository> pluginRepositories )
241        {
242            this.pluginRepositories = pluginRepositories;
243        } //-- void setPluginRepositories( java.util.List )
244    
245        /**
246         * Set extended configuration specific to this profile goes
247         * here.
248         *             Contents take the form of
249         *             <property.name>property.value</property.name>
250         * 
251         * @param properties
252         */
253        public void setProperties( java.util.Properties properties )
254        {
255            this.properties = properties;
256        } //-- void setProperties( java.util.Properties )
257    
258        /**
259         * Set the lists of the remote repositories.
260         * 
261         * @param repositories
262         */
263        public void setRepositories( java.util.List<Repository> repositories )
264        {
265            this.repositories = repositories;
266        } //-- void setRepositories( java.util.List )
267    
268    }