Coverage Report - org.apache.maven.plugins.assembly.model.FileItem
 
Classes in this File Line Coverage Branch Coverage Complexity
FileItem
0%
0/25
N/A
1
 
 1  
 /*
 2  
  * $Id$
 3  
  */
 4  
 
 5  
 package org.apache.maven.plugins.assembly.model;
 6  
 
 7  
 /**
 8  
  * 
 9  
  *         A file allows individual file inclusion with the option
 10  
  * to change
 11  
  *         the destination filename not supported by fileSets.
 12  
  *       
 13  
  * 
 14  
  * @version $Revision$ $Date$
 15  
  */
 16  0
 public class FileItem implements java.io.Serializable {
 17  
 
 18  
 
 19  
       //--------------------------/
 20  
      //- Class/Member Variables -/
 21  
     //--------------------------/
 22  
 
 23  
     /**
 24  
      * Field source
 25  
      */
 26  
     private String source;
 27  
 
 28  
     /**
 29  
      * Field outputDirectory
 30  
      */
 31  
     private String outputDirectory;
 32  
 
 33  
     /**
 34  
      * Field destName
 35  
      */
 36  
     private String destName;
 37  
 
 38  
     /**
 39  
      * Field fileMode
 40  
      */
 41  0
     private String fileMode = "0644";
 42  
 
 43  
     /**
 44  
      * Field lineEnding
 45  
      */
 46  
     private String lineEnding;
 47  
 
 48  
     /**
 49  
      * Field filtered
 50  
      */
 51  0
     private boolean filtered = false;
 52  
 
 53  
 
 54  
       //-----------/
 55  
      //- Methods -/
 56  
     //-----------/
 57  
 
 58  
     /**
 59  
      * Get 
 60  
      *             Sets the destination filename in the
 61  
      * outputDirectory.
 62  
      *             Default is the same name as the source's file.
 63  
      *           
 64  
      */
 65  
     public String getDestName()
 66  
     {
 67  0
         return this.destName;
 68  
     } //-- String getDestName() 
 69  
 
 70  
     /**
 71  
      * Get 
 72  
      *             
 73  
      *             Similar to a UNIX permission, sets the file mode
 74  
      * of the files included.
 75  
      *             Format: (User)(Group)(Other) where each
 76  
      * component is a sum of Read = 4,
 77  
      *             Write = 2, and Execute = 1.  For example, the
 78  
      * default value of 0644
 79  
      *             translates to User read-write, Group and Other
 80  
      * read-only.
 81  
      *             <a
 82  
      * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more
 83  
      * on unix-style permissions)</a>
 84  
      *                   
 85  
      *           
 86  
      */
 87  
     public String getFileMode()
 88  
     {
 89  0
         return this.fileMode;
 90  
     } //-- String getFileMode() 
 91  
 
 92  
     /**
 93  
      * Get 
 94  
      *             
 95  
      *             Sets the line-endings of the files in this file.
 96  
      *             Valid values are:
 97  
      *             <ul>
 98  
      *               <li><b>"keep"</b> - Preserve all line
 99  
      * endings</li>
 100  
      *               <li><b>"unix"</b> - Use Unix-style line
 101  
      * endings</li>
 102  
      *               <li><b>"lf"</b> - Use a single line-feed line
 103  
      * endings</li>
 104  
      *               <li><b>"dos"</b> - Use DOS-style line
 105  
      * endings</li>
 106  
      *               <li><b>"crlf"</b> - Use Carraige-return,
 107  
      * line-feed line endings</li>
 108  
      *             </ul>
 109  
      *             
 110  
      *           
 111  
      */
 112  
     public String getLineEnding()
 113  
     {
 114  0
         return this.lineEnding;
 115  
     } //-- String getLineEnding() 
 116  
 
 117  
     /**
 118  
      * Get 
 119  
      *             Sets the output directory relative to the root
 120  
      *             of the root directory of the assembly. For
 121  
      * example,
 122  
      *             "log" will put the specified files in the log
 123  
      * directory.
 124  
      *           
 125  
      */
 126  
     public String getOutputDirectory()
 127  
     {
 128  0
         return this.outputDirectory;
 129  
     } //-- String getOutputDirectory() 
 130  
 
 131  
     /**
 132  
      * Get 
 133  
      *             Sets the absolute or relative path from the
 134  
      * module's directory
 135  
      *             of the file to be included in the assembly.
 136  
      *           
 137  
      */
 138  
     public String getSource()
 139  
     {
 140  0
         return this.source;
 141  
     } //-- String getSource() 
 142  
 
 143  
     /**
 144  
      * Get 
 145  
      *             Sets whether to determine if the file is
 146  
      * filtered.
 147  
      *           
 148  
      */
 149  
     public boolean isFiltered()
 150  
     {
 151  0
         return this.filtered;
 152  
     } //-- boolean isFiltered() 
 153  
 
 154  
     /**
 155  
      * Set 
 156  
      *             Sets the destination filename in the
 157  
      * outputDirectory.
 158  
      *             Default is the same name as the source's file.
 159  
      *           
 160  
      * 
 161  
      * @param destName
 162  
      */
 163  
     public void setDestName(String destName)
 164  
     {
 165  0
         this.destName = destName;
 166  0
     } //-- void setDestName(String) 
 167  
 
 168  
     /**
 169  
      * Set 
 170  
      *             
 171  
      *             Similar to a UNIX permission, sets the file mode
 172  
      * of the files included.
 173  
      *             Format: (User)(Group)(Other) where each
 174  
      * component is a sum of Read = 4,
 175  
      *             Write = 2, and Execute = 1.  For example, the
 176  
      * default value of 0644
 177  
      *             translates to User read-write, Group and Other
 178  
      * read-only.
 179  
      *             <a
 180  
      * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more
 181  
      * on unix-style permissions)</a>
 182  
      *                   
 183  
      *           
 184  
      * 
 185  
      * @param fileMode
 186  
      */
 187  
     public void setFileMode(String fileMode)
 188  
     {
 189  0
         this.fileMode = fileMode;
 190  0
     } //-- void setFileMode(String) 
 191  
 
 192  
     /**
 193  
      * Set 
 194  
      *             Sets whether to determine if the file is
 195  
      * filtered.
 196  
      *           
 197  
      * 
 198  
      * @param filtered
 199  
      */
 200  
     public void setFiltered(boolean filtered)
 201  
     {
 202  0
         this.filtered = filtered;
 203  0
     } //-- void setFiltered(boolean) 
 204  
 
 205  
     /**
 206  
      * Set 
 207  
      *             
 208  
      *             Sets the line-endings of the files in this file.
 209  
      *             Valid values are:
 210  
      *             <ul>
 211  
      *               <li><b>"keep"</b> - Preserve all line
 212  
      * endings</li>
 213  
      *               <li><b>"unix"</b> - Use Unix-style line
 214  
      * endings</li>
 215  
      *               <li><b>"lf"</b> - Use a single line-feed line
 216  
      * endings</li>
 217  
      *               <li><b>"dos"</b> - Use DOS-style line
 218  
      * endings</li>
 219  
      *               <li><b>"crlf"</b> - Use Carraige-return,
 220  
      * line-feed line endings</li>
 221  
      *             </ul>
 222  
      *             
 223  
      *           
 224  
      * 
 225  
      * @param lineEnding
 226  
      */
 227  
     public void setLineEnding(String lineEnding)
 228  
     {
 229  0
         this.lineEnding = lineEnding;
 230  0
     } //-- void setLineEnding(String) 
 231  
 
 232  
     /**
 233  
      * Set 
 234  
      *             Sets the output directory relative to the root
 235  
      *             of the root directory of the assembly. For
 236  
      * example,
 237  
      *             "log" will put the specified files in the log
 238  
      * directory.
 239  
      *           
 240  
      * 
 241  
      * @param outputDirectory
 242  
      */
 243  
     public void setOutputDirectory(String outputDirectory)
 244  
     {
 245  0
         this.outputDirectory = outputDirectory;
 246  0
     } //-- void setOutputDirectory(String) 
 247  
 
 248  
     /**
 249  
      * Set 
 250  
      *             Sets the absolute or relative path from the
 251  
      * module's directory
 252  
      *             of the file to be included in the assembly.
 253  
      *           
 254  
      * 
 255  
      * @param source
 256  
      */
 257  
     public void setSource(String source)
 258  
     {
 259  0
         this.source = source;
 260  0
     } //-- void setSource(String) 
 261  
 
 262  
 
 263  0
     private String modelEncoding = "UTF-8";
 264  
 
 265  
     public void setModelEncoding( String modelEncoding )
 266  
     {
 267  0
         this.modelEncoding = modelEncoding;
 268  0
     }
 269  
 
 270  
     public String getModelEncoding()
 271  
     {
 272  0
         return modelEncoding;
 273  
     }}