1 // =================== DO NOT EDIT THIS FILE ==================== 2 // Generated by Modello 1.11, 3 // any modifications will be overwritten. 4 // ============================================================== 5 6 package org.apache.maven.archetype.metadata; 7 8 /** 9 * 10 * A fileset defines the way the project's files located in 11 * the jar file are used by the Archetype Plugin to generate a 12 * project. 13 * If file or directory name contains 14 * <code>__<i>property</i>__</code> pattern, it is replaced with 15 * corresponding property value. 16 * 17 * 18 * @version $Revision$ $Date$ 19 */ 20 @SuppressWarnings( "all" ) 21 public class FileSet 22 implements java.io.Serializable 23 { 24 25 //--------------------------/ 26 //- Class/Member Variables -/ 27 //--------------------------/ 28 29 /** 30 * 31 * Filesets can be filtered, which means the 32 * selected files will be used as 33 * <a 34 * href="http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html">Velocity 35 * templates</a>. 36 * They can be non-filtered, which means the 37 * selected files will be copied without modification. 38 * 39 */ 40 private boolean filtered = false; 41 42 /** 43 * Filesets can be packaged, which means the selected files 44 * will be generated/copied in a directory 45 * structure that is prepended by the package 46 * property. They can be non-packaged, which means that the 47 * selected 48 * files will be generated/copied without that 49 * prepend. 50 */ 51 private boolean packaged = false; 52 53 /** 54 * Encoding to use when filtering content. 55 */ 56 private String encoding; 57 58 /** 59 * The directory where the files will be searched for, which is 60 * also the directory where the 61 * project's files will be generated. 62 */ 63 private String directory; 64 65 /** 66 * Field includes. 67 */ 68 private java.util.List<String> includes; 69 70 /** 71 * Field excludes. 72 */ 73 private java.util.List<String> excludes; 74 75 76 //-----------/ 77 //- Methods -/ 78 //-----------/ 79 80 /** 81 * Method addExclude. 82 * 83 * @param string 84 */ 85 public void addExclude( String string ) 86 { 87 getExcludes().add( string ); 88 } //-- void addExclude( String ) 89 90 /** 91 * Method addInclude. 92 * 93 * @param string 94 */ 95 public void addInclude( String string ) 96 { 97 getIncludes().add( string ); 98 } //-- void addInclude( String ) 99 100 /** 101 * Get the directory where the files will be searched for, 102 * which is also the directory where the 103 * project's files will be generated. 104 * 105 * @return String 106 */ 107 public String getDirectory() 108 { 109 return this.directory; 110 } //-- String getDirectory() 111 112 /** 113 * Get encoding to use when filtering content. 114 * 115 * @return String 116 */ 117 public String getEncoding() 118 { 119 return this.encoding; 120 } //-- String getEncoding() 121 122 /** 123 * Method getExcludes. 124 * 125 * @return List 126 */ 127 public java.util.List<String> getExcludes() 128 { 129 if ( this.excludes == null ) 130 { 131 this.excludes = new java.util.ArrayList<String>(); 132 } 133 134 return this.excludes; 135 } //-- java.util.List<String> getExcludes() 136 137 /** 138 * Method getIncludes. 139 * 140 * @return List 141 */ 142 public java.util.List<String> getIncludes() 143 { 144 if ( this.includes == null ) 145 { 146 this.includes = new java.util.ArrayList<String>(); 147 } 148 149 return this.includes; 150 } //-- java.util.List<String> getIncludes() 151 152 /** 153 * Get filesets can be filtered, which means the selected files 154 * will be used as 155 * <a 156 * href="http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html">Velocity 157 * templates</a>. 158 * They can be non-filtered, which means the 159 * selected files will be copied without modification. 160 * 161 * @return boolean 162 */ 163 public boolean isFiltered() 164 { 165 return this.filtered; 166 } //-- boolean isFiltered() 167 168 /** 169 * Get filesets can be packaged, which means the selected files 170 * will be generated/copied in a directory 171 * structure that is prepended by the package 172 * property. They can be non-packaged, which means that the 173 * selected 174 * files will be generated/copied without that 175 * prepend. 176 * 177 * @return boolean 178 */ 179 public boolean isPackaged() 180 { 181 return this.packaged; 182 } //-- boolean isPackaged() 183 184 /** 185 * Method removeExclude. 186 * 187 * @param string 188 */ 189 public void removeExclude( String string ) 190 { 191 getExcludes().remove( string ); 192 } //-- void removeExclude( String ) 193 194 /** 195 * Method removeInclude. 196 * 197 * @param string 198 */ 199 public void removeInclude( String string ) 200 { 201 getIncludes().remove( string ); 202 } //-- void removeInclude( String ) 203 204 /** 205 * Set the directory where the files will be searched for, 206 * which is also the directory where the 207 * project's files will be generated. 208 * 209 * @param directory 210 */ 211 public void setDirectory( String directory ) 212 { 213 this.directory = directory; 214 } //-- void setDirectory( String ) 215 216 /** 217 * Set encoding to use when filtering content. 218 * 219 * @param encoding 220 */ 221 public void setEncoding( String encoding ) 222 { 223 this.encoding = encoding; 224 } //-- void setEncoding( String ) 225 226 /** 227 * Set exclusion definition "à la" Ant. 228 * 229 * @param excludes 230 */ 231 public void setExcludes( java.util.List<String> excludes ) 232 { 233 this.excludes = excludes; 234 } //-- void setExcludes( java.util.List ) 235 236 /** 237 * Set filesets can be filtered, which means the selected files 238 * will be used as 239 * <a 240 * href="http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html">Velocity 241 * templates</a>. 242 * They can be non-filtered, which means the 243 * selected files will be copied without modification. 244 * 245 * @param filtered 246 */ 247 public void setFiltered( boolean filtered ) 248 { 249 this.filtered = filtered; 250 } //-- void setFiltered( boolean ) 251 252 /** 253 * Set inclusion definition "à la" Ant. 254 * 255 * @param includes 256 */ 257 public void setIncludes( java.util.List<String> includes ) 258 { 259 this.includes = includes; 260 } //-- void setIncludes( java.util.List ) 261 262 /** 263 * Set filesets can be packaged, which means the selected files 264 * will be generated/copied in a directory 265 * structure that is prepended by the package 266 * property. They can be non-packaged, which means that the 267 * selected 268 * files will be generated/copied without that 269 * prepend. 270 * 271 * @param packaged 272 */ 273 public void setPackaged( boolean packaged ) 274 { 275 this.packaged = packaged; 276 } //-- void setPackaged( boolean ) 277 278 279 public String toString() 280 { 281 return 282 getDirectory() + " (" 283 + ( isFiltered() ? "Filtered" : "Copied" ) 284 + "-" 285 + ( isPackaged() ? "Packaged" : "Flat" ) 286 + ") [" 287 + org.codehaus.plexus.util.StringUtils.join( getIncludes().iterator(), ", " ) 288 + " -- " 289 + org.codehaus.plexus.util.StringUtils.join( getExcludes().iterator(), ", " ) 290 + "]"; 291 292 } 293 294 }