001// =================== DO NOT EDIT THIS FILE ==================== 002// Generated by Modello 1.8.1, 003// any modifications will be overwritten. 004// ============================================================== 005 006package org.apache.maven.model; 007 008/** 009 * The conditions within the build runtime environment which will 010 * trigger the 011 * automatic inclusion of the build profile. Multiple 012 * conditions can be defined, which must 013 * be all satisfied to activate the profile. 014 * 015 * 016 * @version $Revision$ $Date$ 017 */ 018@SuppressWarnings( "all" ) 019public class Activation 020 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker 021{ 022 023 //--------------------------/ 024 //- Class/Member Variables -/ 025 //--------------------------/ 026 027 /** 028 * If set to true, this profile will be active unless another 029 * profile in this 030 * pom is activated using the command line -P 031 * option or by one of that profile's 032 * activators. 033 */ 034 private boolean activeByDefault = false; 035 036 /** 037 * 038 * 039 * Specifies that this profile will be activated 040 * when a matching JDK is detected. 041 * For example, <code>1.4</code> only activates on 042 * JDKs versioned 1.4, 043 * while <code>!1.4</code> matches any JDK that is 044 * not version 1.4. Ranges are supported too: 045 * <code>[1.5,)</code> activates when the JDK is 046 * 1.5 minimum. 047 * 048 * 049 */ 050 private String jdk; 051 052 /** 053 * Specifies that this profile will be activated when matching 054 * operating system 055 * attributes are detected. 056 */ 057 private ActivationOS os; 058 059 /** 060 * Specifies that this profile will be activated when this 061 * system property is 062 * specified. 063 */ 064 private ActivationProperty property; 065 066 /** 067 * Specifies that this profile will be activated based on 068 * existence of a file. 069 */ 070 private ActivationFile file; 071 072 /** 073 * Field locations. 074 */ 075 private java.util.Map<Object, InputLocation> locations; 076 077 078 //-----------/ 079 //- Methods -/ 080 //-----------/ 081 082 /** 083 * Method clone. 084 * 085 * @return Activation 086 */ 087 public Activation clone() 088 { 089 try 090 { 091 Activation copy = (Activation) super.clone(); 092 093 if ( this.os != null ) 094 { 095 copy.os = (ActivationOS) this.os.clone(); 096 } 097 098 if ( this.property != null ) 099 { 100 copy.property = (ActivationProperty) this.property.clone(); 101 } 102 103 if ( this.file != null ) 104 { 105 copy.file = (ActivationFile) this.file.clone(); 106 } 107 108 if ( copy.locations != null ) 109 { 110 copy.locations = new java.util.LinkedHashMap( copy.locations ); 111 } 112 113 return copy; 114 } 115 catch ( java.lang.Exception ex ) 116 { 117 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 118 + " does not support clone()" ).initCause( ex ); 119 } 120 } //-- Activation clone() 121 122 /** 123 * Get specifies that this profile will be activated based on 124 * existence of a file. 125 * 126 * @return ActivationFile 127 */ 128 public ActivationFile getFile() 129 { 130 return this.file; 131 } //-- ActivationFile getFile() 132 133 /** 134 * Get specifies that this profile will be activated when a 135 * matching JDK is detected. 136 * For example, <code>1.4</code> only activates on 137 * JDKs versioned 1.4, 138 * while <code>!1.4</code> matches any JDK that is 139 * not version 1.4. Ranges are supported too: 140 * <code>[1.5,)</code> activates when the JDK is 141 * 1.5 minimum. 142 * 143 * @return String 144 */ 145 public String getJdk() 146 { 147 return this.jdk; 148 } //-- String getJdk() 149 150 /** 151 * 152 * 153 * @param key 154 * @return InputLocation 155 */ 156 public InputLocation getLocation( Object key ) 157 { 158 return ( locations != null ) ? locations.get( key ) : null; 159 } //-- InputLocation getLocation( Object ) 160 161 /** 162 * Get specifies that this profile will be activated when 163 * matching operating system 164 * attributes are detected. 165 * 166 * @return ActivationOS 167 */ 168 public ActivationOS getOs() 169 { 170 return this.os; 171 } //-- ActivationOS getOs() 172 173 /** 174 * Get specifies that this profile will be activated when this 175 * system property is 176 * specified. 177 * 178 * @return ActivationProperty 179 */ 180 public ActivationProperty getProperty() 181 { 182 return this.property; 183 } //-- ActivationProperty getProperty() 184 185 /** 186 * Get if set to true, this profile will be active unless 187 * another profile in this 188 * pom is activated using the command line -P 189 * option or by one of that profile's 190 * activators. 191 * 192 * @return boolean 193 */ 194 public boolean isActiveByDefault() 195 { 196 return this.activeByDefault; 197 } //-- boolean isActiveByDefault() 198 199 /** 200 * Set if set to true, this profile will be active unless 201 * another profile in this 202 * pom is activated using the command line -P 203 * option or by one of that profile's 204 * activators. 205 * 206 * @param activeByDefault 207 */ 208 public void setActiveByDefault( boolean activeByDefault ) 209 { 210 this.activeByDefault = activeByDefault; 211 } //-- void setActiveByDefault( boolean ) 212 213 /** 214 * Set specifies that this profile will be activated based on 215 * existence of a file. 216 * 217 * @param file 218 */ 219 public void setFile( ActivationFile file ) 220 { 221 this.file = file; 222 } //-- void setFile( ActivationFile ) 223 224 /** 225 * Set specifies that this profile will be activated when a 226 * matching JDK is detected. 227 * For example, <code>1.4</code> only activates on 228 * JDKs versioned 1.4, 229 * while <code>!1.4</code> matches any JDK that is 230 * not version 1.4. Ranges are supported too: 231 * <code>[1.5,)</code> activates when the JDK is 232 * 1.5 minimum. 233 * 234 * @param jdk 235 */ 236 public void setJdk( String jdk ) 237 { 238 this.jdk = jdk; 239 } //-- void setJdk( String ) 240 241 /** 242 * 243 * 244 * @param key 245 * @param location 246 */ 247 public void setLocation( Object key, InputLocation location ) 248 { 249 if ( location != null ) 250 { 251 if ( this.locations == null ) 252 { 253 this.locations = new java.util.LinkedHashMap<Object, InputLocation>(); 254 } 255 this.locations.put( key, location ); 256 } 257 } //-- void setLocation( Object, InputLocation ) 258 259 /** 260 * Set specifies that this profile will be activated when 261 * matching operating system 262 * attributes are detected. 263 * 264 * @param os 265 */ 266 public void setOs( ActivationOS os ) 267 { 268 this.os = os; 269 } //-- void setOs( ActivationOS ) 270 271 /** 272 * Set specifies that this profile will be activated when this 273 * system property is 274 * specified. 275 * 276 * @param property 277 */ 278 public void setProperty( ActivationProperty property ) 279 { 280 this.property = property; 281 } //-- void setProperty( ActivationProperty ) 282 283}