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

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

There is a newer version: 3.0.0-alpha-3
Show newest version
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 2.1.2,
// any modifications will be overwritten.
// ==============================================================

package org.apache.maven.model;

/**
 * 
 *         
 *         The <plugin> element in
 * <reporting><plugins> contains
 * informations required for a report plugin.
 *         
 *       
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class ReportPlugin
    extends ConfigurationContainer
    implements java.io.Serializable, java.lang.Cloneable
{

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

    /**
     * The group ID of the reporting plugin in the repository.
     */
    private String groupId = "org.apache.maven.plugins";

    /**
     * The artifact ID of the reporting plugin in the repository.
     */
    private String artifactId;

    /**
     * 
     *             
     *             The version of the reporting plugin to be used.
     * Starting with Maven 3, if no version is defined explicitely,
     *             version is searched in
     * build/plugins then in
     * build/pluginManagement.
     *             
     *           
     */
    private String version;

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


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

    /**
     * Method addReportSet.
     * 
     * @param reportSet a reportSet object.
     */
    public void addReportSet( ReportSet reportSet )
    {
        getReportSets().add( reportSet );
    } //-- void addReportSet( ReportSet )

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

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

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

    /**
     * Get the artifact ID of the reporting plugin in the
     * repository.
     * 
     * @return String
     */
    public String getArtifactId()
    {
        return this.artifactId;
    } //-- String getArtifactId()

    /**
     * Get the group ID of the reporting plugin in the repository.
     * 
     * @return String
     */
    public String getGroupId()
    {
        return this.groupId;
    } //-- String getGroupId()

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

        return this.reportSets;
    } //-- java.util.List getReportSets()

    /**
     * Get the version of the reporting plugin to be used. Starting
     * with Maven 3, if no version is defined explicitely,
     *             version is searched in
     * build/plugins then in
     * build/pluginManagement.
     * 
     * @return String
     */
    public String getVersion()
    {
        return this.version;
    } //-- String getVersion()

    /**
     * Method removeReportSet.
     * 
     * @param reportSet a reportSet object.
     */
    public void removeReportSet( ReportSet reportSet )
    {
        getReportSets().remove( reportSet );
    } //-- void removeReportSet( ReportSet )

    /**
     * Set the artifact ID of the reporting plugin in the
     * repository.
     * 
     * @param artifactId a artifactId object.
     */
    public void setArtifactId( String artifactId )
    {
        this.artifactId = artifactId;
    } //-- void setArtifactId( String )

    /**
     * Set the group ID of the reporting plugin in the repository.
     * 
     * @param groupId a groupId object.
     */
    public void setGroupId( String groupId )
    {
        this.groupId = groupId;
    } //-- void setGroupId( String )

    /**
     * Set multiple specifications of a set of reports, each having
     * (possibly) different
     *             configuration. This is the reporting parallel to
     * an execution in the build.
     * 
     * @param reportSets a reportSets object.
     */
    public void setReportSets( java.util.List reportSets )
    {
        this.reportSets = reportSets;
    } //-- void setReportSets( java.util.List )

    /**
     * Set the version of the reporting plugin to be used. Starting
     * with Maven 3, if no version is defined explicitely,
     *             version is searched in
     * build/plugins then in
     * build/pluginManagement.
     * 
     * @param version a version object.
     */
    public void setVersion( String version )
    {
        this.version = version;
    } //-- void setVersion( String )

    
            
    private java.util.Map reportSetMap = null;

    /**
     * Reset the reportSetMap field to null
     */
    public void flushReportSetMap()
    {
        this.reportSetMap = null;
    }

    /**
     * @return a Map of reportSets field with ReportSet#getId() as key
     * @see org.apache.maven.model.ReportSet#getId()
     */
    public java.util.Map getReportSetsAsMap()
    {
        if ( reportSetMap == null )
        {
            reportSetMap = new java.util.LinkedHashMap();
            if ( getReportSets() != null )
            {
                for ( java.util.Iterator i = getReportSets().iterator(); i.hasNext(); )
                {
                    ReportSet reportSet = (ReportSet) i.next();
                    reportSetMap.put( reportSet.getId(), reportSet );
                }
            }
        }

        return reportSetMap;
    }

    /**
     * @return the key of the report plugin, ie groupId:artifactId
     */
    public String getKey()
    {
        return constructKey( groupId, artifactId );
    }

    /**
     * @param groupId The group ID of the plugin in the repository
     * @param artifactId The artifact ID of the reporting plugin in the repository
     * @return the key of the report plugin, ie groupId:artifactId
     */
    public static String constructKey( String groupId, String artifactId )
    {
        return groupId + ":" + artifactId;
    }
            
          
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy