View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  You may obtain a copy of the License at
9    
10       http://www.apache.org/licenses/LICENSE-2.0
11   
12   Unless required by applicable law or agreed to in writing,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.4.0,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.archetype.model;
25  
26  /**
27   * Describes the assembly layout and packaging.
28   * 
29   * @version $Revision$ $Date$
30   */
31  @SuppressWarnings( "all" )
32  public class ArchetypeModel
33      implements java.io.Serializable
34  {
35  
36        //--------------------------/
37       //- Class/Member Variables -/
38      //--------------------------/
39  
40      /**
41       * The value should be the same as the artifactId in the
42       * archetype <code>pom.xml</code>.
43       */
44      private String id;
45  
46      /**
47       * Setting this option to <code>true</code> makes it possible
48       * to run the
49       *             <code>archetype:create</code> even on existing
50       * projects.
51       */
52      private boolean allowPartial = false;
53  
54      /**
55       * Field sources.
56       */
57      private java.util.List<Source> sources;
58  
59      /**
60       * Field resources.
61       */
62      private java.util.List<Resource> resources;
63  
64      /**
65       * Field testSources.
66       */
67      private java.util.List<Source> testSources;
68  
69      /**
70       * Field testResources.
71       */
72      private java.util.List<Resource> testResources;
73  
74      /**
75       * Field siteResources.
76       */
77      private java.util.List<Resource> siteResources;
78  
79      /**
80       * Field modelEncoding.
81       */
82      private String modelEncoding = "UTF-8";
83  
84  
85        //-----------/
86       //- Methods -/
87      //-----------/
88  
89      /**
90       * Method addResource.
91       * 
92       * @param resource a resource object.
93       */
94      public void addResource( Resource resource )
95      {
96          getResources().add( resource );
97      } //-- void addResource( Resource )
98  
99      /**
100      * Method addSiteResource.
101      * 
102      * @param resource a resource object.
103      */
104     public void addSiteResource( Resource resource )
105     {
106         getSiteResources().add( resource );
107     } //-- void addSiteResource( Resource )
108 
109     /**
110      * Method addSource.
111      * 
112      * @param source a source object.
113      */
114     public void addSource( Source source )
115     {
116         getSources().add( source );
117     } //-- void addSource( Source )
118 
119     /**
120      * Method addTestResource.
121      * 
122      * @param resource a resource object.
123      */
124     public void addTestResource( Resource resource )
125     {
126         getTestResources().add( resource );
127     } //-- void addTestResource( Resource )
128 
129     /**
130      * Method addTestSource.
131      * 
132      * @param source a source object.
133      */
134     public void addTestSource( Source source )
135     {
136         getTestSources().add( source );
137     } //-- void addTestSource( Source )
138 
139     /**
140      * Get the value should be the same as the artifactId in the
141      * archetype <code>pom.xml</code>.
142      * 
143      * @return String
144      */
145     public String getId()
146     {
147         return this.id;
148     } //-- String getId()
149 
150     /**
151      * Get the modelEncoding field.
152      * 
153      * @return String
154      */
155     public String getModelEncoding()
156     {
157         return this.modelEncoding;
158     } //-- String getModelEncoding()
159 
160     /**
161      * Method getResources.
162      * 
163      * @return List
164      */
165     public java.util.List<Resource> getResources()
166     {
167         if ( this.resources == null )
168         {
169             this.resources = new java.util.ArrayList<Resource>();
170         }
171 
172         return this.resources;
173     } //-- java.util.List<Resource> getResources()
174 
175     /**
176      * Method getSiteResources.
177      * 
178      * @return List
179      */
180     public java.util.List<Resource> getSiteResources()
181     {
182         if ( this.siteResources == null )
183         {
184             this.siteResources = new java.util.ArrayList<Resource>();
185         }
186 
187         return this.siteResources;
188     } //-- java.util.List<Resource> getSiteResources()
189 
190     /**
191      * Method getSources.
192      * 
193      * @return List
194      */
195     public java.util.List<Source> getSources()
196     {
197         if ( this.sources == null )
198         {
199             this.sources = new java.util.ArrayList<Source>();
200         }
201 
202         return this.sources;
203     } //-- java.util.List<Source> getSources()
204 
205     /**
206      * Method getTestResources.
207      * 
208      * @return List
209      */
210     public java.util.List<Resource> getTestResources()
211     {
212         if ( this.testResources == null )
213         {
214             this.testResources = new java.util.ArrayList<Resource>();
215         }
216 
217         return this.testResources;
218     } //-- java.util.List<Resource> getTestResources()
219 
220     /**
221      * Method getTestSources.
222      * 
223      * @return List
224      */
225     public java.util.List<Source> getTestSources()
226     {
227         if ( this.testSources == null )
228         {
229             this.testSources = new java.util.ArrayList<Source>();
230         }
231 
232         return this.testSources;
233     } //-- java.util.List<Source> getTestSources()
234 
235     /**
236      * Get setting this option to <code>true</code> makes it
237      * possible to run the
238      *             <code>archetype:create</code> even on existing
239      * projects.
240      * 
241      * @return boolean
242      */
243     public boolean isAllowPartial()
244     {
245         return this.allowPartial;
246     } //-- boolean isAllowPartial()
247 
248     /**
249      * Method removeResource.
250      * 
251      * @param resource a resource object.
252      */
253     public void removeResource( Resource resource )
254     {
255         getResources().remove( resource );
256     } //-- void removeResource( Resource )
257 
258     /**
259      * Method removeSiteResource.
260      * 
261      * @param resource a resource object.
262      */
263     public void removeSiteResource( Resource resource )
264     {
265         getSiteResources().remove( resource );
266     } //-- void removeSiteResource( Resource )
267 
268     /**
269      * Method removeSource.
270      * 
271      * @param source a source object.
272      */
273     public void removeSource( Source source )
274     {
275         getSources().remove( source );
276     } //-- void removeSource( Source )
277 
278     /**
279      * Method removeTestResource.
280      * 
281      * @param resource a resource object.
282      */
283     public void removeTestResource( Resource resource )
284     {
285         getTestResources().remove( resource );
286     } //-- void removeTestResource( Resource )
287 
288     /**
289      * Method removeTestSource.
290      * 
291      * @param source a source object.
292      */
293     public void removeTestSource( Source source )
294     {
295         getTestSources().remove( source );
296     } //-- void removeTestSource( Source )
297 
298     /**
299      * Set setting this option to <code>true</code> makes it
300      * possible to run the
301      *             <code>archetype:create</code> even on existing
302      * projects.
303      * 
304      * @param allowPartial a allowPartial object.
305      */
306     public void setAllowPartial( boolean allowPartial )
307     {
308         this.allowPartial = allowPartial;
309     } //-- void setAllowPartial( boolean )
310 
311     /**
312      * Set the value should be the same as the artifactId in the
313      * archetype <code>pom.xml</code>.
314      * 
315      * @param id a id object.
316      */
317     public void setId( String id )
318     {
319         this.id = id;
320     } //-- void setId( String )
321 
322     /**
323      * Set the modelEncoding field.
324      * 
325      * @param modelEncoding a modelEncoding object.
326      */
327     public void setModelEncoding( String modelEncoding )
328     {
329         this.modelEncoding = modelEncoding;
330     } //-- void setModelEncoding( String )
331 
332     /**
333      * Set files that will go into <code>src/main/resources</code>.
334      * 
335      * @param resources a resources object.
336      */
337     public void setResources( java.util.List<Resource> resources )
338     {
339         this.resources = resources;
340     } //-- void setResources( java.util.List )
341 
342     /**
343      * Set files that will go into <code>src/site</code>.
344      * 
345      * @param siteResources a siteResources object.
346      */
347     public void setSiteResources( java.util.List<Resource> siteResources )
348     {
349         this.siteResources = siteResources;
350     } //-- void setSiteResources( java.util.List )
351 
352     /**
353      * Set files that will go into <code>src/main/java</code>.
354      * 
355      * @param sources a sources object.
356      */
357     public void setSources( java.util.List<Source> sources )
358     {
359         this.sources = sources;
360     } //-- void setSources( java.util.List )
361 
362     /**
363      * Set files that will go into <code>src/test/resources</code>.
364      * 
365      * @param testResources a testResources object.
366      */
367     public void setTestResources( java.util.List<Resource> testResources )
368     {
369         this.testResources = testResources;
370     } //-- void setTestResources( java.util.List )
371 
372     /**
373      * Set files that will go into <code>src/test/java</code>.
374      * 
375      * @param testSources a testSources object.
376      */
377     public void setTestSources( java.util.List<Source> testSources )
378     {
379         this.testSources = testSources;
380     } //-- void setTestSources( java.util.List )
381 
382 }