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: 4.0.0-beta-5
Show newest version
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 2.3.0,
// 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;

    /**
     * Field location.
     */
    private InputLocation location;

    /**
     * Field excludeDefaultsLocation.
     */
    private InputLocation excludeDefaultsLocation;

    /**
     * Field outputDirectoryLocation.
     */
    private InputLocation outputDirectoryLocation;

    /**
     * Field pluginsLocation.
     */
    private InputLocation pluginsLocation;


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

    /**
     * Method addPlugin.
     * 
     * @param reportPlugin a reportPlugin object.
     */
    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 a key object.
     * @return InputLocation
     */
    public InputLocation getLocation( Object key )
    {
        if ( key instanceof String )
        {
            switch ( ( String ) key )
            {
                case "" :
                {
                    return this.location;
                }
                case "excludeDefaults" :
                {
                    return excludeDefaultsLocation;
                }
                case "outputDirectory" :
                {
                    return outputDirectoryLocation;
                }
                case "plugins" :
                {
                    return pluginsLocation;
                }
                default :
                {
                    return getOtherLocation( key );
                }
                }
            }
            else
            {
                return getOtherLocation( key );
            }
    } //-- InputLocation getLocation( Object )

    /**
     * 
     * 
     * @param key a key object.
     * @param location a location object.
     */
    public void setLocation( Object key, InputLocation location )
    {
        if ( key instanceof String )
        {
            switch ( ( String ) key )
            {
                case "" :
                {
                    this.location = location;
                    return;
                }
                case "excludeDefaults" :
                {
                    excludeDefaultsLocation = location;
                    return;
                }
                case "outputDirectory" :
                {
                    outputDirectoryLocation = location;
                    return;
                }
                case "plugins" :
                {
                    pluginsLocation = location;
                    return;
                }
                default :
                {
                    setOtherLocation( key, location );
                    return;
                }
            }
        }
        else
        {
            setOtherLocation( key, location );
        }
    } //-- void setLocation( Object, InputLocation )

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

    /**
     * 
     * 
     * @param key a key object.
     * @return InputLocation
     */
    private InputLocation getOtherLocation( Object key )
    {
        return ( locations != null ) ? locations.get( key ) : null;
    } //-- InputLocation getOtherLocation( 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 a reportPlugin object.
     */
    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 a excludeDefaults object.
     */
    public void setExcludeDefaults( String excludeDefaults )
    {
        this.excludeDefaults = excludeDefaults;
    } //-- void setExcludeDefaults( String )

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

    /**
     * Set the reporting plugins to use and their configuration.
     * 
     * @param plugins a plugins object.
     */
    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