1 /* 2 =================== DO NOT EDIT THIS FILE ==================== 3 Generated by Modello 1.4.1 on 2012-01-20 18:09:18, 4 any modifications will be overwritten. 5 ============================================================== 6 */ 7 8 package org.apache.maven.model; 9 10 /** 11 * The conditions within the build runtime environment which will 12 * trigger the 13 * automatic inclusion of the build profile. 14 * 15 * @version $Revision$ $Date$ 16 */ 17 @SuppressWarnings( "all" ) 18 public class Activation 19 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker 20 { 21 22 //--------------------------/ 23 //- Class/Member Variables -/ 24 //--------------------------/ 25 26 /** 27 * If set to true, this profile will be active unless another 28 * profile in this 29 * pom is activated using the command line -P 30 * option or by one of that profile's 31 * activators. 32 */ 33 private boolean activeByDefault = false; 34 35 /** 36 * 37 * 38 * Specifies that this profile will be activated 39 * when a matching JDK is detected. 40 * For example, <code>1.4</code> only activates on 41 * JDKs versioned 1.4, 42 * while <code>!1.4</code> matches any JDK that is 43 * not version 1.4. 44 * 45 * 46 */ 47 private String jdk; 48 49 /** 50 * Specifies that this profile will be activated when matching 51 * operating system 52 * attributes are detected. 53 */ 54 private ActivationOS os; 55 56 /** 57 * Specifies that this profile will be activated when this 58 * system property is 59 * specified. 60 */ 61 private ActivationProperty property; 62 63 /** 64 * Specifies that this profile will be activated based on 65 * existence of a file. 66 */ 67 private ActivationFile file; 68 69 /** 70 * Field locations. 71 */ 72 private java.util.Map<Object, InputLocation> locations; 73 74 75 //-----------/ 76 //- Methods -/ 77 //-----------/ 78 79 /** 80 * Method clone. 81 * 82 * @return Activation 83 */ 84 public Activation clone() 85 { 86 try 87 { 88 Activation copy = (Activation) super.clone(); 89 90 if ( this.os != null ) 91 { 92 copy.os = (ActivationOS) this.os.clone(); 93 } 94 95 if ( this.property != null ) 96 { 97 copy.property = (ActivationProperty) this.property.clone(); 98 } 99 100 if ( this.file != null ) 101 { 102 copy.file = (ActivationFile) this.file.clone(); 103 } 104 105 if ( copy.locations != null ) 106 { 107 copy.locations = new java.util.LinkedHashMap( copy.locations ); 108 } 109 110 return copy; 111 } 112 catch ( java.lang.Exception ex ) 113 { 114 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 115 + " does not support clone()" ).initCause( ex ); 116 } 117 } //-- Activation clone() 118 119 /** 120 * Get specifies that this profile will be activated based on 121 * existence of a file. 122 * 123 * @return ActivationFile 124 */ 125 public ActivationFile getFile() 126 { 127 return this.file; 128 } //-- ActivationFile getFile() 129 130 /** 131 * Get specifies that this profile will be activated when a 132 * matching JDK is detected. 133 * For example, <code>1.4</code> only activates on 134 * JDKs versioned 1.4, 135 * while <code>!1.4</code> matches any JDK that is 136 * not version 1.4. 137 * 138 * @return String 139 */ 140 public String getJdk() 141 { 142 return this.jdk; 143 } //-- String getJdk() 144 145 /** 146 * 147 * 148 * @param key 149 * @return InputLocation 150 */ 151 public InputLocation getLocation( Object key ) 152 { 153 return ( locations != null ) ? locations.get( key ) : null; 154 } //-- InputLocation getLocation( Object ) 155 156 /** 157 * Get specifies that this profile will be activated when 158 * matching operating system 159 * attributes are detected. 160 * 161 * @return ActivationOS 162 */ 163 public ActivationOS getOs() 164 { 165 return this.os; 166 } //-- ActivationOS getOs() 167 168 /** 169 * Get specifies that this profile will be activated when this 170 * system property is 171 * specified. 172 * 173 * @return ActivationProperty 174 */ 175 public ActivationProperty getProperty() 176 { 177 return this.property; 178 } //-- ActivationProperty getProperty() 179 180 /** 181 * Get if set to true, this profile will be active unless 182 * another profile in this 183 * pom is activated using the command line -P 184 * option or by one of that profile's 185 * activators. 186 * 187 * @return boolean 188 */ 189 public boolean isActiveByDefault() 190 { 191 return this.activeByDefault; 192 } //-- boolean isActiveByDefault() 193 194 /** 195 * Set if set to true, this profile will be active unless 196 * another profile in this 197 * pom is activated using the command line -P 198 * option or by one of that profile's 199 * activators. 200 * 201 * @param activeByDefault 202 */ 203 public void setActiveByDefault( boolean activeByDefault ) 204 { 205 this.activeByDefault = activeByDefault; 206 } //-- void setActiveByDefault( boolean ) 207 208 /** 209 * Set specifies that this profile will be activated based on 210 * existence of a file. 211 * 212 * @param file 213 */ 214 public void setFile( ActivationFile file ) 215 { 216 this.file = file; 217 } //-- void setFile( ActivationFile ) 218 219 /** 220 * Set specifies that this profile will be activated when a 221 * matching JDK is detected. 222 * For example, <code>1.4</code> only activates on 223 * JDKs versioned 1.4, 224 * while <code>!1.4</code> matches any JDK that is 225 * not version 1.4. 226 * 227 * @param jdk 228 */ 229 public void setJdk( String jdk ) 230 { 231 this.jdk = jdk; 232 } //-- void setJdk( String ) 233 234 /** 235 * 236 * 237 * @param key 238 * @param location 239 */ 240 public void setLocation( Object key, InputLocation location ) 241 { 242 if ( location != null ) 243 { 244 if ( this.locations == null ) 245 { 246 this.locations = new java.util.LinkedHashMap<Object, InputLocation>(); 247 } 248 this.locations.put( key, location ); 249 } 250 } //-- void setLocation( Object, InputLocation ) 251 252 /** 253 * Set specifies that this profile will be activated when 254 * matching operating system 255 * attributes are detected. 256 * 257 * @param os 258 */ 259 public void setOs( ActivationOS os ) 260 { 261 this.os = os; 262 } //-- void setOs( ActivationOS ) 263 264 /** 265 * Set specifies that this profile will be activated when this 266 * system property is 267 * specified. 268 * 269 * @param property 270 */ 271 public void setProperty( ActivationProperty property ) 272 { 273 this.property = property; 274 } //-- void setProperty( ActivationProperty ) 275 276 }