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