View Javadoc

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