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.shared.model.fileset;
25  
26  /**
27   * Class SetBase.
28   * 
29   * @version $Revision$ $Date$
30   */
31  @SuppressWarnings( "all" )
32  public class SetBase
33      implements java.io.Serializable
34  {
35  
36        //--------------------------/
37       //- Class/Member Variables -/
38      //--------------------------/
39  
40      /**
41       * 
42       *             Specifies whether symbolic links should be
43       * traversed, or handled as-is.
44       *           
45       */
46      private boolean followSymlinks = false;
47  
48      /**
49       * 
50       *             Specifies the output directory relative to the
51       * root
52       *             of the root directory of the assembly.  For
53       * example,
54       *             "log" will put the specified files in the log
55       * directory.
56       *           
57       */
58      private String outputDirectory;
59  
60      /**
61       * 
62       *             Whether to include exclusion patterns for common
63       * temporary and SCM control
64       *             files (true by default).
65       *           
66       */
67      private boolean useDefaultExcludes = true;
68  
69      /**
70       * Field includes.
71       */
72      private java.util.List<String> includes;
73  
74      /**
75       * Field excludes.
76       */
77      private java.util.List<String> excludes;
78  
79      /**
80       * 
81       *             
82       *             Similar to a UNIX permission.  Format:
83       * (User)(Group)(Other) where each
84       *             component is a sum of Read = 4, Write = 2, and
85       * Execute = 1.  For example,
86       *             the default value of 0644 translates to User
87       * read-write, Group and Other
88       *             read-only.
89       *             <a
90       * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more
91       * on unix-style
92       *             permissions)</a>
93       *             
94       *           
95       */
96      private String fileMode = "0644";
97  
98      /**
99       * 
100      *             
101      *             Similar to a UNIX permission.  Format:
102      * (User)(Group)(Other) where each
103      *             component is a sum of Read = 4, Write = 2, and
104      * Execute = 1.  For example,
105      *             the default value of 0755 translates to User
106      * read-write, Group and Other
107      *             read-only.
108      *             <a
109      * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more
110      * on unix-style
111      *             permissions)</a>
112      *             
113      *           
114      */
115     private String directoryMode = "0755";
116 
117     /**
118      * 
119      *             Specifies the mapper used.
120      *           
121      */
122     private Mapper mapper = new Mapper();
123 
124 
125       //-----------/
126      //- Methods -/
127     //-----------/
128 
129     /**
130      * Method addExclude.
131      * 
132      * @param string a string object.
133      */
134     public void addExclude( String string )
135     {
136         getExcludes().add( string );
137     } //-- void addExclude( String )
138 
139     /**
140      * Method addInclude.
141      * 
142      * @param string a string object.
143      */
144     public void addInclude( String string )
145     {
146         getIncludes().add( string );
147     } //-- void addInclude( String )
148 
149     /**
150      * Get similar to a UNIX permission.  Format:
151      * (User)(Group)(Other) where each
152      *             component is a sum of Read = 4, Write = 2, and
153      * Execute = 1.  For example,
154      *             the default value of 0755 translates to User
155      * read-write, Group and Other
156      *             read-only.
157      *             <a
158      * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more
159      * on unix-style
160      *             permissions)</a>
161      * 
162      * @return String
163      */
164     public String getDirectoryMode()
165     {
166         return this.directoryMode;
167     } //-- String getDirectoryMode()
168 
169     /**
170      * Method getExcludes.
171      * 
172      * @return List
173      */
174     public java.util.List<String> getExcludes()
175     {
176         if ( this.excludes == null )
177         {
178             this.excludes = new java.util.ArrayList<String>();
179         }
180 
181         return this.excludes;
182     } //-- java.util.List<String> getExcludes()
183 
184     /**
185      * Get similar to a UNIX permission.  Format:
186      * (User)(Group)(Other) where each
187      *             component is a sum of Read = 4, Write = 2, and
188      * Execute = 1.  For example,
189      *             the default value of 0644 translates to User
190      * read-write, Group and Other
191      *             read-only.
192      *             <a
193      * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more
194      * on unix-style
195      *             permissions)</a>
196      * 
197      * @return String
198      */
199     public String getFileMode()
200     {
201         return this.fileMode;
202     } //-- String getFileMode()
203 
204     /**
205      * Method getIncludes.
206      * 
207      * @return List
208      */
209     public java.util.List<String> getIncludes()
210     {
211         if ( this.includes == null )
212         {
213             this.includes = new java.util.ArrayList<String>();
214         }
215 
216         return this.includes;
217     } //-- java.util.List<String> getIncludes()
218 
219     /**
220      * Get specifies the mapper used.
221      * 
222      * @return Mapper
223      */
224     public Mapper getMapper()
225     {
226         return this.mapper;
227     } //-- Mapper getMapper()
228 
229     /**
230      * Get specifies the output directory relative to the root
231      *             of the root directory of the assembly.  For
232      * example,
233      *             "log" will put the specified files in the log
234      * directory.
235      * 
236      * @return String
237      */
238     public String getOutputDirectory()
239     {
240         return this.outputDirectory;
241     } //-- String getOutputDirectory()
242 
243     /**
244      * Get specifies whether symbolic links should be traversed, or
245      * handled as-is.
246      * 
247      * @return boolean
248      */
249     public boolean isFollowSymlinks()
250     {
251         return this.followSymlinks;
252     } //-- boolean isFollowSymlinks()
253 
254     /**
255      * Get whether to include exclusion patterns for common
256      * temporary and SCM control
257      *             files (true by default).
258      * 
259      * @return boolean
260      */
261     public boolean isUseDefaultExcludes()
262     {
263         return this.useDefaultExcludes;
264     } //-- boolean isUseDefaultExcludes()
265 
266     /**
267      * Method removeExclude.
268      * 
269      * @param string a string object.
270      */
271     public void removeExclude( String string )
272     {
273         getExcludes().remove( string );
274     } //-- void removeExclude( String )
275 
276     /**
277      * Method removeInclude.
278      * 
279      * @param string a string object.
280      */
281     public void removeInclude( String string )
282     {
283         getIncludes().remove( string );
284     } //-- void removeInclude( String )
285 
286     /**
287      * Set similar to a UNIX permission.  Format:
288      * (User)(Group)(Other) where each
289      *             component is a sum of Read = 4, Write = 2, and
290      * Execute = 1.  For example,
291      *             the default value of 0755 translates to User
292      * read-write, Group and Other
293      *             read-only.
294      *             <a
295      * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more
296      * on unix-style
297      *             permissions)</a>
298      * 
299      * @param directoryMode a directoryMode object.
300      */
301     public void setDirectoryMode( String directoryMode )
302     {
303         this.directoryMode = directoryMode;
304     } //-- void setDirectoryMode( String )
305 
306     /**
307      * Set when &lt;exclude&gt; subelements are present, they
308      * define
309      *             a set of files and directory to exclude.
310      * 
311      * @param excludes a excludes object.
312      */
313     public void setExcludes( java.util.List<String> excludes )
314     {
315         this.excludes = excludes;
316     } //-- void setExcludes( java.util.List )
317 
318     /**
319      * Set similar to a UNIX permission.  Format:
320      * (User)(Group)(Other) where each
321      *             component is a sum of Read = 4, Write = 2, and
322      * Execute = 1.  For example,
323      *             the default value of 0644 translates to User
324      * read-write, Group and Other
325      *             read-only.
326      *             <a
327      * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more
328      * on unix-style
329      *             permissions)</a>
330      * 
331      * @param fileMode a fileMode object.
332      */
333     public void setFileMode( String fileMode )
334     {
335         this.fileMode = fileMode;
336     } //-- void setFileMode( String )
337 
338     /**
339      * Set specifies whether symbolic links should be traversed, or
340      * handled as-is.
341      * 
342      * @param followSymlinks a followSymlinks object.
343      */
344     public void setFollowSymlinks( boolean followSymlinks )
345     {
346         this.followSymlinks = followSymlinks;
347     } //-- void setFollowSymlinks( boolean )
348 
349     /**
350      * Set when &lt;include&gt; subelements are present, they
351      * define
352      *             a set of files and directory to include.
353      * 
354      * @param includes a includes object.
355      */
356     public void setIncludes( java.util.List<String> includes )
357     {
358         this.includes = includes;
359     } //-- void setIncludes( java.util.List )
360 
361     /**
362      * Set specifies the mapper used.
363      * 
364      * @param mapper a mapper object.
365      */
366     public void setMapper( Mapper mapper )
367     {
368         this.mapper = mapper;
369     } //-- void setMapper( Mapper )
370 
371     /**
372      * Set specifies the output directory relative to the root
373      *             of the root directory of the assembly.  For
374      * example,
375      *             "log" will put the specified files in the log
376      * directory.
377      * 
378      * @param outputDirectory a outputDirectory object.
379      */
380     public void setOutputDirectory( String outputDirectory )
381     {
382         this.outputDirectory = outputDirectory;
383     } //-- void setOutputDirectory( String )
384 
385     /**
386      * Set whether to include exclusion patterns for common
387      * temporary and SCM control
388      *             files (true by default).
389      * 
390      * @param useDefaultExcludes a useDefaultExcludes object.
391      */
392     public void setUseDefaultExcludes( boolean useDefaultExcludes )
393     {
394         this.useDefaultExcludes = useDefaultExcludes;
395     } //-- void setUseDefaultExcludes( boolean )
396 
397     
398     /**
399      * @return the file-set inclusion rules in array form.
400      */
401     public String[] getIncludesArray()
402     {
403         String[] includesArry = null;
404         java.util.List<String> includes = getIncludes();
405         if ( includes != null && !includes.isEmpty() )
406         {
407             includesArry = (String[]) includes.toArray( new String[0] );
408         }
409         else if ( includes != null )
410         {
411             includesArry = new String[0];
412         }
413 
414         return includesArry;
415     }
416 
417     /**
418      * @return the file-set exclusion rules in array form.
419      */
420     public String[] getExcludesArray()
421     {
422         String[] excludesArry = null;
423         java.util.List<String> excludes = getExcludes();
424         if ( excludes != null && !excludes.isEmpty() )
425         {
426             excludesArry = (String[]) excludes.toArray( new String[0] );
427         }
428         else if ( excludes != null )
429         {
430             excludesArry = new String[0];
431         }
432 
433         return excludesArry;
434     }
435 
436           
437 }