001    // =================== DO NOT EDIT THIS FILE ====================
002    // Generated by Modello 1.7,
003    // any modifications will be overwritten.
004    // ==============================================================
005    
006    package org.apache.maven.model;
007    
008    /**
009     * Section for management of reports and their configuration.
010     * 
011     * @version $Revision$ $Date$
012     */
013    @SuppressWarnings( "all" )
014    public class Reporting
015        implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
016    {
017    
018          //--------------------------/
019         //- Class/Member Variables -/
020        //--------------------------/
021    
022        /**
023         * 
024         *             
025         *             If true, then the default reports are not
026         * included in the site generation.
027         *             This includes the reports in the "Project Info"
028         * menu. Note: While the type
029         *             of this field is <code>String</code> for
030         * technical reasons, the semantic type is actually
031         *             <code>Boolean</code>. Default value is
032         * <code>false</code>.
033         *             
034         *           
035         */
036        private String excludeDefaults;
037    
038        /**
039         * 
040         *             
041         *             Where to store all of the generated reports. The
042         * default is
043         *             <code>${project.build.directory}/site</code>
044         *             .
045         *             
046         *           
047         */
048        private String outputDirectory;
049    
050        /**
051         * Field plugins.
052         */
053        private java.util.List<ReportPlugin> plugins;
054    
055        /**
056         * Field locations.
057         */
058        private java.util.Map<Object, InputLocation> locations;
059    
060    
061          //-----------/
062         //- Methods -/
063        //-----------/
064    
065        /**
066         * Method addPlugin.
067         * 
068         * @param reportPlugin
069         */
070        public void addPlugin( ReportPlugin reportPlugin )
071        {
072            getPlugins().add( reportPlugin );
073        } //-- void addPlugin( ReportPlugin )
074    
075        /**
076         * Method clone.
077         * 
078         * @return Reporting
079         */
080        public Reporting clone()
081        {
082            try
083            {
084                Reporting copy = (Reporting) super.clone();
085    
086                if ( this.plugins != null )
087                {
088                    copy.plugins = new java.util.ArrayList<ReportPlugin>();
089                    for ( ReportPlugin item : this.plugins )
090                    {
091                        copy.plugins.add( ( (ReportPlugin) item).clone() );
092                    }
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        } //-- Reporting clone()
108    
109        /**
110         * Get if true, then the default reports are not included in
111         * the site generation.
112         *             This includes the reports in the "Project Info"
113         * menu. Note: While the type
114         *             of this field is <code>String</code> for
115         * technical reasons, the semantic type is actually
116         *             <code>Boolean</code>. Default value is
117         * <code>false</code>.
118         * 
119         * @return String
120         */
121        public String getExcludeDefaults()
122        {
123            return this.excludeDefaults;
124        } //-- String getExcludeDefaults()
125    
126        /**
127         * 
128         * 
129         * @param key
130         * @return InputLocation
131         */
132        public InputLocation getLocation( Object key )
133        {
134            return ( locations != null ) ? locations.get( key ) : null;
135        } //-- InputLocation getLocation( Object )
136    
137        /**
138         * Get where to store all of the generated reports. The default
139         * is
140         *             <code>${project.build.directory}/site</code>
141         *             .
142         * 
143         * @return String
144         */
145        public String getOutputDirectory()
146        {
147            return this.outputDirectory;
148        } //-- String getOutputDirectory()
149    
150        /**
151         * Method getPlugins.
152         * 
153         * @return List
154         */
155        public java.util.List<ReportPlugin> getPlugins()
156        {
157            if ( this.plugins == null )
158            {
159                this.plugins = new java.util.ArrayList<ReportPlugin>();
160            }
161    
162            return this.plugins;
163        } //-- java.util.List<ReportPlugin> getPlugins()
164    
165        /**
166         * Method removePlugin.
167         * 
168         * @param reportPlugin
169         */
170        public void removePlugin( ReportPlugin reportPlugin )
171        {
172            getPlugins().remove( reportPlugin );
173        } //-- void removePlugin( ReportPlugin )
174    
175        /**
176         * Set if true, then the default reports are not included in
177         * the site generation.
178         *             This includes the reports in the "Project Info"
179         * menu. Note: While the type
180         *             of this field is <code>String</code> for
181         * technical reasons, the semantic type is actually
182         *             <code>Boolean</code>. Default value is
183         * <code>false</code>.
184         * 
185         * @param excludeDefaults
186         */
187        public void setExcludeDefaults( String excludeDefaults )
188        {
189            this.excludeDefaults = excludeDefaults;
190        } //-- void setExcludeDefaults( String )
191    
192        /**
193         * 
194         * 
195         * @param key
196         * @param location
197         */
198        public void setLocation( Object key, InputLocation location )
199        {
200            if ( location != null )
201            {
202                if ( this.locations == null )
203                {
204                    this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
205                }
206                this.locations.put( key, location );
207            }
208        } //-- void setLocation( Object, InputLocation )
209    
210        /**
211         * Set where to store all of the generated reports. The default
212         * is
213         *             <code>${project.build.directory}/site</code>
214         *             .
215         * 
216         * @param outputDirectory
217         */
218        public void setOutputDirectory( String outputDirectory )
219        {
220            this.outputDirectory = outputDirectory;
221        } //-- void setOutputDirectory( String )
222    
223        /**
224         * Set the reporting plugins to use and their configuration.
225         * 
226         * @param plugins
227         */
228        public void setPlugins( java.util.List<ReportPlugin> plugins )
229        {
230            this.plugins = plugins;
231        } //-- void setPlugins( java.util.List )
232    
233        
234                
235        public boolean isExcludeDefaults()
236        {
237            return ( excludeDefaults != null ) ? Boolean.parseBoolean( excludeDefaults ) : false;
238        }
239    
240        public void setExcludeDefaults( boolean excludeDefaults )
241        {
242            this.excludeDefaults = String.valueOf( excludeDefaults );
243        }
244    
245        java.util.Map<String, ReportPlugin> reportPluginMap;
246    
247        /**
248         * Reset the <code>reportPluginMap</code> field to <code>null</code>
249         */
250        public synchronized void flushReportPluginMap()
251        {
252            this.reportPluginMap = null;
253        }
254    
255        /**
256         * @return a Map of plugins field with <code>ReportPlugin#getKey()</code> as key
257         * @see org.apache.maven.model.ReportPlugin#getKey()
258         */
259        public synchronized java.util.Map<String, ReportPlugin> getReportPluginsAsMap()
260        {
261            if ( reportPluginMap == null )
262            {
263                reportPluginMap = new java.util.LinkedHashMap<String, ReportPlugin>();
264                if ( getPlugins() != null )
265                {
266                    for ( java.util.Iterator<ReportPlugin> it = getPlugins().iterator(); it.hasNext(); )
267                    {
268                        ReportPlugin reportPlugin = (ReportPlugin) it.next();
269                        reportPluginMap.put( reportPlugin.getKey(), reportPlugin );
270                    }
271                }
272            }
273    
274            return reportPluginMap;
275        }
276                
277              
278    }