1 // =================== DO NOT EDIT THIS FILE ==================== 2 // Generated by Modello 1.8.1, 3 // any modifications will be overwritten. 4 // ============================================================== 5 6 package org.apache.maven.model; 7 8 /** 9 * Contains the configuration information of the container like 10 * Plugin. 11 * 12 * @version $Revision$ $Date$ 13 */ 14 @SuppressWarnings( "all" ) 15 public class ConfigurationContainer 16 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker 17 { 18 19 //--------------------------/ 20 //- Class/Member Variables -/ 21 //--------------------------/ 22 23 /** 24 * 25 * 26 * Whether any configuration should be propagated 27 * to child POMs. Note: While the type 28 * of this field is <code>String</code> for 29 * technical reasons, the semantic type is actually 30 * <code>Boolean</code>. Default value is 31 * <code>true</code>. 32 * 33 * 34 */ 35 private String inherited; 36 37 /** 38 * 39 * 40 * <p>The configuration as DOM object.</p> 41 * <p>By default, every element content is trimmed, 42 * but starting with Maven 3.1.0, you can add 43 * <code>xml:space="preserve"</code> to elements 44 * you want to preserve whitespace.</p> 45 * <p>You can control how child POMs inherit 46 * configuration from parent POMs by adding 47 * <code>combine.children</code> 48 * or <code>combine.self</code> attributes to the 49 * children of the configuration element:</p> 50 * <ul> 51 * <li><code>combine.children</code>: available 52 * values are <code>merge</code> (default) and 53 * <code>append</code>,</li> 54 * <li><code>combine.self</code>: available values 55 * are <code>merge</code> (default) and 56 * <code>override</code>.</li> 57 * </ul> 58 * <p>See <a 59 * href="http://maven.apache.org/pom.html#Plugins">POM 60 * Reference documentation</a> and 61 * <a 62 * href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a> 63 * for more information.</p> 64 * 65 * 66 */ 67 private Object configuration; 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 ConfigurationContainer 83 */ 84 public ConfigurationContainer clone() 85 { 86 try 87 { 88 ConfigurationContainer copy = (ConfigurationContainer) super.clone(); 89 90 if ( this.configuration != null ) 91 { 92 copy.configuration = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.configuration ); 93 } 94 95 if ( copy.locations != null ) 96 { 97 copy.locations = new java.util.LinkedHashMap( copy.locations ); 98 } 99 100 return copy; 101 } 102 catch ( java.lang.Exception ex ) 103 { 104 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 105 + " does not support clone()" ).initCause( ex ); 106 } 107 } //-- ConfigurationContainer clone() 108 109 /** 110 * Get <p>The configuration as DOM object.</p> 111 * <p>By default, every element content is trimmed, 112 * but starting with Maven 3.1.0, you can add 113 * <code>xml:space="preserve"</code> to elements 114 * you want to preserve whitespace.</p> 115 * <p>You can control how child POMs inherit 116 * configuration from parent POMs by adding 117 * <code>combine.children</code> 118 * or <code>combine.self</code> attributes to the 119 * children of the configuration element:</p> 120 * <ul> 121 * <li><code>combine.children</code>: available 122 * values are <code>merge</code> (default) and 123 * <code>append</code>,</li> 124 * <li><code>combine.self</code>: available values 125 * are <code>merge</code> (default) and 126 * <code>override</code>.</li> 127 * </ul> 128 * <p>See <a 129 * href="http://maven.apache.org/pom.html#Plugins">POM 130 * Reference documentation</a> and 131 * <a 132 * href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a> 133 * for more information.</p> 134 * 135 * @return Object 136 */ 137 public Object getConfiguration() 138 { 139 return this.configuration; 140 } //-- Object getConfiguration() 141 142 /** 143 * Get whether any configuration should be propagated to child 144 * POMs. Note: While the type 145 * of this field is <code>String</code> for 146 * technical reasons, the semantic type is actually 147 * <code>Boolean</code>. Default value is 148 * <code>true</code>. 149 * 150 * @return String 151 */ 152 public String getInherited() 153 { 154 return this.inherited; 155 } //-- String getInherited() 156 157 /** 158 * 159 * 160 * @param key 161 * @return InputLocation 162 */ 163 public InputLocation getLocation( Object key ) 164 { 165 return ( locations != null ) ? locations.get( key ) : null; 166 } //-- InputLocation getLocation( Object ) 167 168 /** 169 * Set <p>The configuration as DOM object.</p> 170 * <p>By default, every element content is trimmed, 171 * but starting with Maven 3.1.0, you can add 172 * <code>xml:space="preserve"</code> to elements 173 * you want to preserve whitespace.</p> 174 * <p>You can control how child POMs inherit 175 * configuration from parent POMs by adding 176 * <code>combine.children</code> 177 * or <code>combine.self</code> attributes to the 178 * children of the configuration element:</p> 179 * <ul> 180 * <li><code>combine.children</code>: available 181 * values are <code>merge</code> (default) and 182 * <code>append</code>,</li> 183 * <li><code>combine.self</code>: available values 184 * are <code>merge</code> (default) and 185 * <code>override</code>.</li> 186 * </ul> 187 * <p>See <a 188 * href="http://maven.apache.org/pom.html#Plugins">POM 189 * Reference documentation</a> and 190 * <a 191 * href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a> 192 * for more information.</p> 193 * 194 * @param configuration 195 */ 196 public void setConfiguration( Object configuration ) 197 { 198 this.configuration = configuration; 199 } //-- void setConfiguration( Object ) 200 201 /** 202 * Set whether any configuration should be propagated to child 203 * POMs. Note: While the type 204 * of this field is <code>String</code> for 205 * technical reasons, the semantic type is actually 206 * <code>Boolean</code>. Default value is 207 * <code>true</code>. 208 * 209 * @param inherited 210 */ 211 public void setInherited( String inherited ) 212 { 213 this.inherited = inherited; 214 } //-- void setInherited( String ) 215 216 /** 217 * 218 * 219 * @param key 220 * @param location 221 */ 222 public void setLocation( Object key, InputLocation location ) 223 { 224 if ( location != null ) 225 { 226 if ( this.locations == null ) 227 { 228 this.locations = new java.util.LinkedHashMap<Object, InputLocation>(); 229 } 230 this.locations.put( key, location ); 231 } 232 } //-- void setLocation( Object, InputLocation ) 233 234 235 236 public boolean isInherited() 237 { 238 return ( inherited != null ) ? Boolean.parseBoolean( inherited ) : true; 239 } 240 241 public void setInherited( boolean inherited ) 242 { 243 this.inherited = String.valueOf( inherited ); 244 } 245 246 private boolean inheritanceApplied = true; 247 248 public void unsetInheritanceApplied() 249 { 250 this.inheritanceApplied = false; 251 } 252 253 public boolean isInheritanceApplied() 254 { 255 return inheritanceApplied; 256 } 257 258 259 }