001    /*
002     =================== DO NOT EDIT THIS FILE ====================
003     Generated by Modello 1.4.1 on 2012-01-20 18:09:18,
004     any modifications will be overwritten.
005     ==============================================================
006     */
007    
008    package org.apache.maven.model;
009    
010    /**
011     * Contains the configuration information of the container like
012     * Plugin.
013     * 
014     * @version $Revision$ $Date$
015     */
016    @SuppressWarnings( "all" )
017    public class ConfigurationContainer
018        implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
019    {
020    
021          //--------------------------/
022         //- Class/Member Variables -/
023        //--------------------------/
024    
025        /**
026         * 
027         *             
028         *             Whether any configuration should be propagated
029         * to child POMs. Note: While the type
030         *             of this field is <code>String</code> for
031         * technical reasons, the semantic type is actually
032         *             <code>Boolean</code>. Default value is
033         * <code>true</code>.
034         *             
035         *           
036         */
037        private String inherited;
038    
039        /**
040         * 
041         *             
042         *             The configuration as DOM object.
043         *             You can control how child POMs inherit
044         * configuration from parent POMs by adding
045         * <code>combine.children</code>
046         *             or <code>combine.self</code> attributes to the
047         * children of the configuration element:
048         *             <ul>
049         *             <li><code>combine.children</code>: available
050         * values are <code>merge</code> (default) and
051         * <code>append</code>,</li>
052         *             <li><code>combine.self</code>: available values
053         * are <code>merge</code> (default) and
054         * <code>override</code>.</li>
055         *             </ul>
056         *             See <a
057         * href="http://maven.apache.org/pom.html#Plugins">POM
058         * Reference documentation</a> and
059         *             <a
060         * href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a>
061         *             for more information.
062         *             
063         *           
064         */
065        private Object configuration;
066    
067        /**
068         * Field locations.
069         */
070        private java.util.Map<Object, InputLocation> locations;
071    
072    
073          //-----------/
074         //- Methods -/
075        //-----------/
076    
077        /**
078         * Method clone.
079         * 
080         * @return ConfigurationContainer
081         */
082        public ConfigurationContainer clone()
083        {
084            try
085            {
086                ConfigurationContainer copy = (ConfigurationContainer) super.clone();
087    
088                if ( this.configuration != null )
089                {
090                    copy.configuration = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.configuration );
091                }
092    
093                if ( copy.locations != null )
094                {
095                    copy.locations = new java.util.LinkedHashMap( copy.locations );
096                }
097    
098                return copy;
099            }
100            catch ( java.lang.Exception ex )
101            {
102                throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
103                    + " does not support clone()" ).initCause( ex );
104            }
105        } //-- ConfigurationContainer clone()
106    
107        /**
108         * Get the configuration as DOM object.
109         *             You can control how child POMs inherit
110         * configuration from parent POMs by adding
111         * <code>combine.children</code>
112         *             or <code>combine.self</code> attributes to the
113         * children of the configuration element:
114         *             <ul>
115         *             <li><code>combine.children</code>: available
116         * values are <code>merge</code> (default) and
117         * <code>append</code>,</li>
118         *             <li><code>combine.self</code>: available values
119         * are <code>merge</code> (default) and
120         * <code>override</code>.</li>
121         *             </ul>
122         *             See <a
123         * href="http://maven.apache.org/pom.html#Plugins">POM
124         * Reference documentation</a> and
125         *             <a
126         * href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a>
127         *             for more information.
128         * 
129         * @return Object
130         */
131        public Object getConfiguration()
132        {
133            return this.configuration;
134        } //-- Object getConfiguration()
135    
136        /**
137         * Get whether any configuration should be propagated to child
138         * POMs. Note: While the type
139         *             of this field is <code>String</code> for
140         * technical reasons, the semantic type is actually
141         *             <code>Boolean</code>. Default value is
142         * <code>true</code>.
143         * 
144         * @return String
145         */
146        public String getInherited()
147        {
148            return this.inherited;
149        } //-- String getInherited()
150    
151        /**
152         * 
153         * 
154         * @param key
155         * @return InputLocation
156         */
157        public InputLocation getLocation( Object key )
158        {
159            return ( locations != null ) ? locations.get( key ) : null;
160        } //-- InputLocation getLocation( Object )
161    
162        /**
163         * Set the configuration as DOM object.
164         *             You can control how child POMs inherit
165         * configuration from parent POMs by adding
166         * <code>combine.children</code>
167         *             or <code>combine.self</code> attributes to the
168         * children of the configuration element:
169         *             <ul>
170         *             <li><code>combine.children</code>: available
171         * values are <code>merge</code> (default) and
172         * <code>append</code>,</li>
173         *             <li><code>combine.self</code>: available values
174         * are <code>merge</code> (default) and
175         * <code>override</code>.</li>
176         *             </ul>
177         *             See <a
178         * href="http://maven.apache.org/pom.html#Plugins">POM
179         * Reference documentation</a> and
180         *             <a
181         * href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a>
182         *             for more information.
183         * 
184         * @param configuration
185         */
186        public void setConfiguration( Object configuration )
187        {
188            this.configuration = configuration;
189        } //-- void setConfiguration( Object )
190    
191        /**
192         * Set whether any configuration should be propagated to child
193         * POMs. Note: While the type
194         *             of this field is <code>String</code> for
195         * technical reasons, the semantic type is actually
196         *             <code>Boolean</code>. Default value is
197         * <code>true</code>.
198         * 
199         * @param inherited
200         */
201        public void setInherited( String inherited )
202        {
203            this.inherited = inherited;
204        } //-- void setInherited( String )
205    
206        /**
207         * 
208         * 
209         * @param key
210         * @param location
211         */
212        public void setLocation( Object key, InputLocation location )
213        {
214            if ( location != null )
215            {
216                if ( this.locations == null )
217                {
218                    this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
219                }
220                this.locations.put( key, location );
221            }
222        } //-- void setLocation( Object, InputLocation )
223    
224        
225                
226        public boolean isInherited()
227        {
228            return ( inherited != null ) ? Boolean.parseBoolean( inherited ) : true;
229        }
230    
231        public void setInherited( boolean inherited )
232        {
233            this.inherited = String.valueOf( inherited );
234        }
235    
236        private boolean inheritanceApplied = true;
237    
238        public void unsetInheritanceApplied()
239        {
240            this.inheritanceApplied = false;
241        }
242    
243        public boolean isInheritanceApplied()
244        {
245            return inheritanceApplied;
246        }
247                
248              
249    }