All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.model.Reporting Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 1.8.3,
// any modifications will be overwritten.
// ==============================================================

package org.apache.maven.model;

/**
 * Section for management of reports and their configuration.
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class Reporting
    implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
{

      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * 
     *             
     *             If true, then the default reports are not
     * included in the site generation.
     *             This includes the reports in the "Project Info"
     * menu. Note: While the type
     *             of this field is String for
     * technical reasons, the semantic type is actually
     *             Boolean. Default value is
     * false.
     *             
     *           
     */
    private String excludeDefaults;

    /**
     * 
     *             
     *             Where to store all of the generated reports. The
     * default is
     *             ${project.build.directory}/site.
     *             
     *           
     */
    private String outputDirectory;

    /**
     * Field plugins.
     */
    private java.util.List plugins;

    /**
     * Field locations.
     */
    private java.util.Map locations;


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method addPlugin.
     * 
     * @param reportPlugin
     */
    public void addPlugin( ReportPlugin reportPlugin )
    {
        getPlugins().add( reportPlugin );
    } //-- void addPlugin( ReportPlugin )

    /**
     * Method clone.
     * 
     * @return Reporting
     */
    public Reporting clone()
    {
        try
        {
            Reporting copy = (Reporting) super.clone();

            if ( this.plugins != null )
            {
                copy.plugins = new java.util.ArrayList();
                for ( ReportPlugin item : this.plugins )
                {
                    copy.plugins.add( ( (ReportPlugin) item).clone() );
                }
            }

            if ( copy.locations != null )
            {
                copy.locations = new java.util.LinkedHashMap( copy.locations );
            }

            return copy;
        }
        catch ( java.lang.Exception ex )
        {
            throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
                + " does not support clone()" ).initCause( ex );
        }
    } //-- Reporting clone()

    /**
     * Get if true, then the default reports are not included in
     * the site generation.
     *             This includes the reports in the "Project Info"
     * menu. Note: While the type
     *             of this field is String for
     * technical reasons, the semantic type is actually
     *             Boolean. Default value is
     * false.
     * 
     * @return String
     */
    public String getExcludeDefaults()
    {
        return this.excludeDefaults;
    } //-- String getExcludeDefaults()

    /**
     * 
     * 
     * @param key
     * @return InputLocation
     */
    public InputLocation getLocation( Object key )
    {
        return ( locations != null ) ? locations.get( key ) : null;
    } //-- InputLocation getLocation( Object )

    /**
     * Get where to store all of the generated reports. The default
     * is
     *             ${project.build.directory}/site.
     * 
     * @return String
     */
    public String getOutputDirectory()
    {
        return this.outputDirectory;
    } //-- String getOutputDirectory()

    /**
     * Method getPlugins.
     * 
     * @return List
     */
    public java.util.List getPlugins()
    {
        if ( this.plugins == null )
        {
            this.plugins = new java.util.ArrayList();
        }

        return this.plugins;
    } //-- java.util.List getPlugins()

    /**
     * Method removePlugin.
     * 
     * @param reportPlugin
     */
    public void removePlugin( ReportPlugin reportPlugin )
    {
        getPlugins().remove( reportPlugin );
    } //-- void removePlugin( ReportPlugin )

    /**
     * Set if true, then the default reports are not included in
     * the site generation.
     *             This includes the reports in the "Project Info"
     * menu. Note: While the type
     *             of this field is String for
     * technical reasons, the semantic type is actually
     *             Boolean. Default value is
     * false.
     * 
     * @param excludeDefaults
     */
    public void setExcludeDefaults( String excludeDefaults )
    {
        this.excludeDefaults = excludeDefaults;
    } //-- void setExcludeDefaults( String )

    /**
     * 
     * 
     * @param key
     * @param location
     */
    public void setLocation( Object key, InputLocation location )
    {
        if ( location != null )
        {
            if ( this.locations == null )
            {
                this.locations = new java.util.LinkedHashMap();
            }
            this.locations.put( key, location );
        }
    } //-- void setLocation( Object, InputLocation )

    /**
     * Set where to store all of the generated reports. The default
     * is
     *             ${project.build.directory}/site.
     * 
     * @param outputDirectory
     */
    public void setOutputDirectory( String outputDirectory )
    {
        this.outputDirectory = outputDirectory;
    } //-- void setOutputDirectory( String )

    /**
     * Set the reporting plugins to use and their configuration.
     * 
     * @param plugins
     */
    public void setPlugins( java.util.List plugins )
    {
        this.plugins = plugins;
    } //-- void setPlugins( java.util.List )

    
            
    public boolean isExcludeDefaults()
    {
        return ( excludeDefaults != null ) ? Boolean.parseBoolean( excludeDefaults ) : false;
    }

    public void setExcludeDefaults( boolean excludeDefaults )
    {
        this.excludeDefaults = String.valueOf( excludeDefaults );
    }

    java.util.Map reportPluginMap;

    /**
     * Reset the reportPluginMap field to null
     */
    public synchronized void flushReportPluginMap()
    {
        this.reportPluginMap = null;
    }

    /**
     * @return a Map of plugins field with ReportPlugin#getKey() as key
     * @see org.apache.maven.model.ReportPlugin#getKey()
     */
    public synchronized java.util.Map getReportPluginsAsMap()
    {
        if ( reportPluginMap == null )
        {
            reportPluginMap = new java.util.LinkedHashMap();
            if ( getPlugins() != null )
            {
                for ( java.util.Iterator it = getPlugins().iterator(); it.hasNext(); )
                {
                    ReportPlugin reportPlugin = (ReportPlugin) it.next();
                    reportPluginMap.put( reportPlugin.getKey(), reportPlugin );
                }
            }
        }

        return reportPluginMap;
    }
            
          
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy