View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.11,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.settings;
7   
8   /**
9    * 
10   *         
11   *         Modifications to the build process which is keyed on
12   * some
13   *         sort of environmental parameter.
14   *         
15   *       
16   * 
17   * @version $Revision$ $Date$
18   */
19  @SuppressWarnings( "all" )
20  public class Profile
21      extends IdentifiableBase
22      implements java.io.Serializable, java.lang.Cloneable
23  {
24  
25        //--------------------------/
26       //- Class/Member Variables -/
27      //--------------------------/
28  
29      /**
30       * 
31       *             
32       *             The conditional logic which will automatically
33       *             trigger the inclusion of this profile.
34       *             
35       *           
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       * 
51       *             
52       *             This may be removed or relocated in the near
53       *             future. It is undecided whether plugins really
54       * need a remote
55       *             repository set of their own.
56       *             
57       *           
58       */
59      private java.util.List<Repository> pluginRepositories;
60  
61  
62        //-----------/
63       //- Methods -/
64      //-----------/
65  
66      /**
67       * Method addPluginRepository.
68       * 
69       * @param repository
70       */
71      public void addPluginRepository( Repository repository )
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          getRepositories().add( repository );
95      } //-- void addRepository( Repository )
96  
97      /**
98       * Method clone.
99       * 
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 }