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.model;
9   
10  /**
11   * Generic informations for a build.
12   * 
13   * @version $Revision$ $Date$
14   */
15  public class BuildBase
16      extends PluginConfiguration
17      implements java.io.Serializable
18  {
19  
20        //--------------------------/
21       //- Class/Member Variables -/
22      //--------------------------/
23  
24      /**
25       * The default goal (or phase in Maven 2) to execute when none
26       * is specified for
27       *             the project.
28       */
29      private String defaultGoal;
30  
31      /**
32       * Field resources.
33       */
34      private java.util.List<Resource> resources;
35  
36      /**
37       * Field testResources.
38       */
39      private java.util.List<Resource> testResources;
40  
41      /**
42       * The directory where all files generated by the build are
43       * placed.
44       */
45      private String directory;
46  
47      /**
48       * 
49       *             
50       *             The filename (excluding the extension, and with
51       * no path information) that
52       *             the produced artifact will be called.
53       *             The default value is
54       * <code>${artifactId}-${version}</code>.
55       *             
56       *           
57       */
58      private String finalName;
59  
60      /**
61       * Field filters.
62       */
63      private java.util.List<String> filters;
64  
65  
66        //-----------/
67       //- Methods -/
68      //-----------/
69  
70      /**
71       * Method addFilter.
72       * 
73       * @param string
74       */
75      public void addFilter( String string )
76      {
77          if ( !(string instanceof String) )
78          {
79              throw new ClassCastException( "BuildBase.addFilters(string) parameter must be instanceof " + String.class.getName() );
80          }
81          getFilters().add( string );
82      } //-- void addFilter( String )
83  
84      /**
85       * Method addResource.
86       * 
87       * @param resource
88       */
89      public void addResource( Resource resource )
90      {
91          if ( !(resource instanceof Resource) )
92          {
93              throw new ClassCastException( "BuildBase.addResources(resource) parameter must be instanceof " + Resource.class.getName() );
94          }
95          getResources().add( resource );
96      } //-- void addResource( Resource )
97  
98      /**
99       * Method addTestResource.
100      * 
101      * @param resource
102      */
103     public void addTestResource( Resource resource )
104     {
105         if ( !(resource instanceof Resource) )
106         {
107             throw new ClassCastException( "BuildBase.addTestResources(resource) parameter must be instanceof " + Resource.class.getName() );
108         }
109         getTestResources().add( resource );
110     } //-- void addTestResource( Resource )
111 
112     /**
113      * Get the default goal (or phase in Maven 2) to execute when
114      * none is specified for
115      *             the project.
116      * 
117      * @return String
118      */
119     public String getDefaultGoal()
120     {
121         return this.defaultGoal;
122     } //-- String getDefaultGoal()
123 
124     /**
125      * Get the directory where all files generated by the build are
126      * placed.
127      * 
128      * @return String
129      */
130     public String getDirectory()
131     {
132         return this.directory;
133     } //-- String getDirectory()
134 
135     /**
136      * Method getFilters.
137      * 
138      * @return List
139      */
140     public java.util.List<String> getFilters()
141     {
142         if ( this.filters == null )
143         {
144             this.filters = new java.util.ArrayList<String>();
145         }
146 
147         return this.filters;
148     } //-- java.util.List<String> getFilters()
149 
150     /**
151      * Get the filename (excluding the extension, and with no path
152      * information) that
153      *             the produced artifact will be called.
154      *             The default value is
155      * <code>${artifactId}-${version}</code>.
156      * 
157      * @return String
158      */
159     public String getFinalName()
160     {
161         return this.finalName;
162     } //-- String getFinalName()
163 
164     /**
165      * Method getResources.
166      * 
167      * @return List
168      */
169     public java.util.List<Resource> getResources()
170     {
171         if ( this.resources == null )
172         {
173             this.resources = new java.util.ArrayList<Resource>();
174         }
175 
176         return this.resources;
177     } //-- java.util.List<Resource> getResources()
178 
179     /**
180      * Method getTestResources.
181      * 
182      * @return List
183      */
184     public java.util.List<Resource> getTestResources()
185     {
186         if ( this.testResources == null )
187         {
188             this.testResources = new java.util.ArrayList<Resource>();
189         }
190 
191         return this.testResources;
192     } //-- java.util.List<Resource> getTestResources()
193 
194     /**
195      * Method removeFilter.
196      * 
197      * @param string
198      */
199     public void removeFilter( String string )
200     {
201         if ( !(string instanceof String) )
202         {
203             throw new ClassCastException( "BuildBase.removeFilters(string) parameter must be instanceof " + String.class.getName() );
204         }
205         getFilters().remove( string );
206     } //-- void removeFilter( String )
207 
208     /**
209      * Method removeResource.
210      * 
211      * @param resource
212      */
213     public void removeResource( Resource resource )
214     {
215         if ( !(resource instanceof Resource) )
216         {
217             throw new ClassCastException( "BuildBase.removeResources(resource) parameter must be instanceof " + Resource.class.getName() );
218         }
219         getResources().remove( resource );
220     } //-- void removeResource( Resource )
221 
222     /**
223      * Method removeTestResource.
224      * 
225      * @param resource
226      */
227     public void removeTestResource( Resource resource )
228     {
229         if ( !(resource instanceof Resource) )
230         {
231             throw new ClassCastException( "BuildBase.removeTestResources(resource) parameter must be instanceof " + Resource.class.getName() );
232         }
233         getTestResources().remove( resource );
234     } //-- void removeTestResource( Resource )
235 
236     /**
237      * Set the default goal (or phase in Maven 2) to execute when
238      * none is specified for
239      *             the project.
240      * 
241      * @param defaultGoal
242      */
243     public void setDefaultGoal( String defaultGoal )
244     {
245         this.defaultGoal = defaultGoal;
246     } //-- void setDefaultGoal( String )
247 
248     /**
249      * Set the directory where all files generated by the build are
250      * placed.
251      * 
252      * @param directory
253      */
254     public void setDirectory( String directory )
255     {
256         this.directory = directory;
257     } //-- void setDirectory( String )
258 
259     /**
260      * Set the list of filter properties files that are used when
261      * filtering is enabled.
262      * 
263      * @param filters
264      */
265     public void setFilters( java.util.List<String> filters )
266     {
267         this.filters = filters;
268     } //-- void setFilters( java.util.List )
269 
270     /**
271      * Set the filename (excluding the extension, and with no path
272      * information) that
273      *             the produced artifact will be called.
274      *             The default value is
275      * <code>${artifactId}-${version}</code>.
276      * 
277      * @param finalName
278      */
279     public void setFinalName( String finalName )
280     {
281         this.finalName = finalName;
282     } //-- void setFinalName( String )
283 
284     /**
285      * Set this element describes all of the classpath resources
286      * such as properties
287      *             files associated with a project. These resources
288      * are often included in the final
289      *             package.
290      * 
291      * @param resources
292      */
293     public void setResources( java.util.List<Resource> resources )
294     {
295         this.resources = resources;
296     } //-- void setResources( java.util.List )
297 
298     /**
299      * Set this element describes all of the classpath resources
300      * such as properties
301      *             files associated with a project's unit tests.
302      * 
303      * @param testResources
304      */
305     public void setTestResources( java.util.List<Resource> testResources )
306     {
307         this.testResources = testResources;
308     } //-- void setTestResources( java.util.List )
309 
310 
311 }