View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-01-20 18:09:18,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.model;
9   
10  /**
11   * Contains the configuration information of the container like
12   * Plugin.
13   * 
14   * @version $Revision$ $Date$
15   */
16  @SuppressWarnings( "all" )
17  public class ConfigurationContainer
18      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
19  {
20  
21        //--------------------------/
22       //- Class/Member Variables -/
23      //--------------------------/
24  
25      /**
26       * 
27       *             
28       *             Whether any configuration should be propagated
29       * to child POMs. Note: While the type
30       *             of this field is <code>String</code> for
31       * technical reasons, the semantic type is actually
32       *             <code>Boolean</code>. Default value is
33       * <code>true</code>.
34       *             
35       *           
36       */
37      private String inherited;
38  
39      /**
40       * 
41       *             
42       *             The configuration as DOM object.
43       *             You can control how child POMs inherit
44       * configuration from parent POMs by adding
45       * <code>combine.children</code>
46       *             or <code>combine.self</code> attributes to the
47       * children of the configuration element:
48       *             <ul>
49       *             <li><code>combine.children</code>: available
50       * values are <code>merge</code> (default) and
51       * <code>append</code>,</li>
52       *             <li><code>combine.self</code>: available values
53       * are <code>merge</code> (default) and
54       * <code>override</code>.</li>
55       *             </ul>
56       *             See <a
57       * href="http://maven.apache.org/pom.html#Plugins">POM
58       * Reference documentation</a> and
59       *             <a
60       * href="http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a>
61       *             for more information.
62       *             
63       *           
64       */
65      private Object configuration;
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 ConfigurationContainer
81       */
82      public ConfigurationContainer clone()
83      {
84          try
85          {
86              ConfigurationContainer copy = (ConfigurationContainer) super.clone();
87  
88              if ( this.configuration != null )
89              {
90                  copy.configuration = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.configuration );
91              }
92  
93              if ( copy.locations != null )
94              {
95                  copy.locations = new java.util.LinkedHashMap( copy.locations );
96              }
97  
98              return copy;
99          }
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 }