001// =================== DO NOT EDIT THIS FILE ==================== 002// Generated by Modello 1.8.3, 003// any modifications will be overwritten. 004// ============================================================== 005 006package org.apache.maven.model; 007 008/** 009 * Contains the configuration information of the container like 010 * Plugin. 011 * 012 * @version $Revision$ $Date$ 013 */ 014@SuppressWarnings( "all" ) 015public class ConfigurationContainer 016 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker 017{ 018 019 //--------------------------/ 020 //- Class/Member Variables -/ 021 //--------------------------/ 022 023 /** 024 * 025 * 026 * Whether any configuration should be propagated 027 * to child POMs. Note: While the type 028 * of this field is <code>String</code> for 029 * technical reasons, the semantic type is actually 030 * <code>Boolean</code>. Default value is 031 * <code>true</code>. 032 * 033 * 034 */ 035 private String inherited; 036 037 /** 038 * 039 * 040 * <p>The configuration as DOM object.</p> 041 * <p>By default, every element content is trimmed, 042 * but starting with Maven 3.1.0, you can add 043 * <code>xml:space="preserve"</code> to elements 044 * you want to preserve whitespace.</p> 045 * <p>You can control how child POMs inherit 046 * configuration from parent POMs by adding 047 * <code>combine.children</code> 048 * or <code>combine.self</code> attributes to the 049 * children of the configuration element:</p> 050 * <ul> 051 * <li><code>combine.children</code>: available 052 * values are <code>merge</code> (default) and 053 * <code>append</code>,</li> 054 * <li><code>combine.self</code>: available values 055 * are <code>merge</code> (default) and 056 * <code>override</code>.</li> 057 * </ul> 058 * <p>See <a 059 * href="http://maven.apache.org/pom.html#Plugins">POM 060 * Reference documentation</a> and 061 * <a 062 * href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a> 063 * for more information.</p> 064 * 065 * 066 */ 067 private Object configuration; 068 069 /** 070 * Field locations. 071 */ 072 private java.util.Map<Object, InputLocation> locations; 073 074 075 //-----------/ 076 //- Methods -/ 077 //-----------/ 078 079 /** 080 * Method clone. 081 * 082 * @return ConfigurationContainer 083 */ 084 public ConfigurationContainer clone() 085 { 086 try 087 { 088 ConfigurationContainer copy = (ConfigurationContainer) super.clone(); 089 090 if ( this.configuration != null ) 091 { 092 copy.configuration = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.configuration ); 093 } 094 095 if ( copy.locations != null ) 096 { 097 copy.locations = new java.util.LinkedHashMap( copy.locations ); 098 } 099 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}