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.5.1,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.plugins.assembly.model;
25  
26  /**
27   * 
28   *         A file allows individual file inclusion with the option
29   * to change
30   *         the destination filename not supported by fileSets.
31   *       
32   * 
33   * @version $Revision$ $Date$
34   */
35  @SuppressWarnings( "all" )
36  public class FileItem
37      implements java.io.Serializable
38  {
39  
40        //--------------------------/
41       //- Class/Member Variables -/
42      //--------------------------/
43  
44      /**
45       * 
46       *             Sets the absolute or relative path from the
47       * module's directory
48       *             of the file to be included in the assembly.
49       *           
50       */
51      private String source;
52  
53      /**
54       * Field sources.
55       */
56      private java.util.List<String> sources;
57  
58      /**
59       * 
60       *             Sets the output directory relative to the root
61       *             of the root directory of the assembly. For
62       * example,
63       *             "log" will put the specified files in the log
64       * directory.
65       *           
66       */
67      private String outputDirectory;
68  
69      /**
70       * 
71       *             Sets the destination filename in the
72       * outputDirectory.
73       *             Default is the same name as the source's file.
74       *           
75       */
76      private String destName;
77  
78      /**
79       * 
80       *             
81       *             Similar to a UNIX permission, sets the file mode
82       * of the files included.
83       *             THIS IS AN OCTAL VALUE.
84       *             Format: (User)(Group)(Other) where each
85       * component is a sum of Read = 4,
86       *             Write = 2, and Execute = 1.  For example, the
87       * value 0644
88       *             translates to User read-write, Group and Other
89       * read-only. The default value is 0644.
90       *             <a
91       * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more
92       * on unix-style permissions)</a>
93       *             
94       *           
95       */
96      private String fileMode;
97  
98      /**
99       * 
100      *             
101      *             Sets the line-endings of the files in this file.
102      *             Valid values are:
103      *             <ul>
104      *               <li><b>"keep"</b> - Preserve all line
105      * endings</li>
106      *               <li><b>"unix"</b> - Use Unix-style line
107      * endings</li>
108      *               <li><b>"lf"</b> - Use a single line-feed line
109      * endings</li>
110      *               <li><b>"dos"</b> - Use DOS-style line
111      * endings</li>
112      *               <li><b>"crlf"</b> - Use Carraige-return,
113      * line-feed line endings</li>
114      *             </ul>
115      *             
116      *           
117      */
118     private String lineEnding;
119 
120     /**
121      * 
122      *             Sets whether to determine if the file is
123      * filtered.
124      *           
125      */
126     private boolean filtered = false;
127 
128 
129       //-----------/
130      //- Methods -/
131     //-----------/
132 
133     /**
134      * Method addSource.
135      * 
136      * @param string a string object.
137      */
138     public void addSource( String string )
139     {
140         getSources().add( string );
141     } //-- void addSource( String )
142 
143     /**
144      * Get sets the destination filename in the outputDirectory.
145      *             Default is the same name as the source's file.
146      * 
147      * @return String
148      */
149     public String getDestName()
150     {
151         return this.destName;
152     } //-- String getDestName()
153 
154     /**
155      * Get similar to a UNIX permission, sets the file mode of the
156      * files included.
157      *             THIS IS AN OCTAL VALUE.
158      *             Format: (User)(Group)(Other) where each
159      * component is a sum of Read = 4,
160      *             Write = 2, and Execute = 1.  For example, the
161      * value 0644
162      *             translates to User read-write, Group and Other
163      * read-only. The default value is 0644.
164      *             <a
165      * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more
166      * on unix-style permissions)</a>
167      * 
168      * @return String
169      */
170     public String getFileMode()
171     {
172         return this.fileMode;
173     } //-- String getFileMode()
174 
175     /**
176      * Get sets the line-endings of the files in this file.
177      *             Valid values are:
178      *             <ul>
179      *               <li><b>"keep"</b> - Preserve all line
180      * endings</li>
181      *               <li><b>"unix"</b> - Use Unix-style line
182      * endings</li>
183      *               <li><b>"lf"</b> - Use a single line-feed line
184      * endings</li>
185      *               <li><b>"dos"</b> - Use DOS-style line
186      * endings</li>
187      *               <li><b>"crlf"</b> - Use Carraige-return,
188      * line-feed line endings</li>
189      *             </ul>
190      * 
191      * @return String
192      */
193     public String getLineEnding()
194     {
195         return this.lineEnding;
196     } //-- String getLineEnding()
197 
198     /**
199      * Get sets the output directory relative to the root
200      *             of the root directory of the assembly. For
201      * example,
202      *             "log" will put the specified files in the log
203      * directory.
204      * 
205      * @return String
206      */
207     public String getOutputDirectory()
208     {
209         return this.outputDirectory;
210     } //-- String getOutputDirectory()
211 
212     /**
213      * Get sets the absolute or relative path from the module's
214      * directory
215      *             of the file to be included in the assembly.
216      * 
217      * @return String
218      */
219     public String getSource()
220     {
221         return this.source;
222     } //-- String getSource()
223 
224     /**
225      * Method getSources.
226      * 
227      * @return List
228      */
229     public java.util.List<String> getSources()
230     {
231         if ( this.sources == null )
232         {
233             this.sources = new java.util.ArrayList<String>();
234         }
235 
236         return this.sources;
237     } //-- java.util.List<String> getSources()
238 
239     /**
240      * Get sets whether to determine if the file is filtered.
241      * 
242      * @return boolean
243      */
244     public boolean isFiltered()
245     {
246         return this.filtered;
247     } //-- boolean isFiltered()
248 
249     /**
250      * Method removeSource.
251      * 
252      * @param string a string object.
253      */
254     public void removeSource( String string )
255     {
256         getSources().remove( string );
257     } //-- void removeSource( String )
258 
259     /**
260      * Set sets the destination filename in the outputDirectory.
261      *             Default is the same name as the source's file.
262      * 
263      * @param destName a destName object.
264      */
265     public void setDestName( String destName )
266     {
267         this.destName = destName;
268     } //-- void setDestName( String )
269 
270     /**
271      * Set similar to a UNIX permission, sets the file mode of the
272      * files included.
273      *             THIS IS AN OCTAL VALUE.
274      *             Format: (User)(Group)(Other) where each
275      * component is a sum of Read = 4,
276      *             Write = 2, and Execute = 1.  For example, the
277      * value 0644
278      *             translates to User read-write, Group and Other
279      * read-only. The default value is 0644.
280      *             <a
281      * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more
282      * on unix-style permissions)</a>
283      * 
284      * @param fileMode a fileMode object.
285      */
286     public void setFileMode( String fileMode )
287     {
288         this.fileMode = fileMode;
289     } //-- void setFileMode( String )
290 
291     /**
292      * Set sets whether to determine if the file is filtered.
293      * 
294      * @param filtered a filtered object.
295      */
296     public void setFiltered( boolean filtered )
297     {
298         this.filtered = filtered;
299     } //-- void setFiltered( boolean )
300 
301     /**
302      * Set sets the line-endings of the files in this file.
303      *             Valid values are:
304      *             <ul>
305      *               <li><b>"keep"</b> - Preserve all line
306      * endings</li>
307      *               <li><b>"unix"</b> - Use Unix-style line
308      * endings</li>
309      *               <li><b>"lf"</b> - Use a single line-feed line
310      * endings</li>
311      *               <li><b>"dos"</b> - Use DOS-style line
312      * endings</li>
313      *               <li><b>"crlf"</b> - Use Carraige-return,
314      * line-feed line endings</li>
315      *             </ul>
316      * 
317      * @param lineEnding a lineEnding object.
318      */
319     public void setLineEnding( String lineEnding )
320     {
321         this.lineEnding = lineEnding;
322     } //-- void setLineEnding( String )
323 
324     /**
325      * Set sets the output directory relative to the root
326      *             of the root directory of the assembly. For
327      * example,
328      *             "log" will put the specified files in the log
329      * directory.
330      * 
331      * @param outputDirectory a outputDirectory object.
332      */
333     public void setOutputDirectory( String outputDirectory )
334     {
335         this.outputDirectory = outputDirectory;
336     } //-- void setOutputDirectory( String )
337 
338     /**
339      * Set sets the absolute or relative path from the module's
340      * directory
341      *             of the file to be included in the assembly.
342      * 
343      * @param source a source object.
344      */
345     public void setSource( String source )
346     {
347         this.source = source;
348     } //-- void setSource( String )
349 
350     /**
351      * Set set of absolute or relative paths from the module's
352      * directory
353      *             of the files be combined and included in the
354      * assembly.
355      * 
356      * @param sources a sources object.
357      */
358     public void setSources( java.util.List<String> sources )
359     {
360         this.sources = sources;
361     } //-- void setSources( java.util.List )
362 
363 }