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

org.fedoraproject.xmvn.config.Configuration Maven / Gradle / Ivy

Go to download

This module contains public interface for functionality implemented by XMvn Core.

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

package org.fedoraproject.xmvn.config;

/**
 * 
 *         Root element of the configuration file.
 *       
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class Configuration
    implements java.io.Serializable, java.lang.Cloneable
{

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

    /**
     * Field properties.
     */
    private java.util.Properties properties;

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

    /**
     * This element contains basic XMvn settings.
     */
    private BuildSettings buildSettings;

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

    /**
     * This element contains configuration of XMvn resolver.
     */
    private ResolverSettings resolverSettings;

    /**
     * This element contains configuration of XMvn installer.
     */
    private InstallerSettings installerSettings;

    /**
     * Field modelEncoding.
     */
    private String modelEncoding = "UTF-8";


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

    /**
     * Method addArtifactManagement.
     * 
     * @param packagingRule
     */
    public void addArtifactManagement( PackagingRule packagingRule )
    {
        getArtifactManagement().add( packagingRule );
    } //-- void addArtifactManagement( PackagingRule )

    /**
     * Method addProperty.
     * 
     * @param key
     * @param value
     */
    public void addProperty( String key, String value )
    {
        getProperties().put( key, value );
    } //-- void addProperty( String, String )

    /**
     * Method addRepository.
     * 
     * @param repository
     */
    public void addRepository( Repository repository )
    {
        getRepositories().add( repository );
    } //-- void addRepository( Repository )

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

            if ( this.properties != null )
            {
                copy.properties = (java.util.Properties) this.properties.clone();
            }

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

            if ( this.buildSettings != null )
            {
                copy.buildSettings = (BuildSettings) this.buildSettings.clone();
            }

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

            if ( this.resolverSettings != null )
            {
                copy.resolverSettings = (ResolverSettings) this.resolverSettings.clone();
            }

            if ( this.installerSettings != null )
            {
                copy.installerSettings = (InstallerSettings) this.installerSettings.clone();
            }

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

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

        return this.artifactManagement;
    } //-- java.util.List getArtifactManagement()

    /**
     * Get this element contains basic XMvn settings.
     * 
     * @return BuildSettings
     */
    public BuildSettings getBuildSettings()
    {
        return this.buildSettings;
    } //-- BuildSettings getBuildSettings()

    /**
     * Get this element contains configuration of XMvn installer.
     * 
     * @return InstallerSettings
     */
    public InstallerSettings getInstallerSettings()
    {
        return this.installerSettings;
    } //-- InstallerSettings getInstallerSettings()

    /**
     * Get the modelEncoding field.
     * 
     * @return String
     */
    public String getModelEncoding()
    {
        return this.modelEncoding;
    } //-- String getModelEncoding()

    /**
     * Method getProperties.
     * 
     * @return Properties
     */
    public java.util.Properties getProperties()
    {
        if ( this.properties == null )
        {
            this.properties = new java.util.Properties();
        }

        return this.properties;
    } //-- java.util.Properties getProperties()

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

        return this.repositories;
    } //-- java.util.List getRepositories()

    /**
     * Get this element contains configuration of XMvn resolver.
     * 
     * @return ResolverSettings
     */
    public ResolverSettings getResolverSettings()
    {
        return this.resolverSettings;
    } //-- ResolverSettings getResolverSettings()

    /**
     * Method removeArtifactManagement.
     * 
     * @param packagingRule
     */
    public void removeArtifactManagement( PackagingRule packagingRule )
    {
        getArtifactManagement().remove( packagingRule );
    } //-- void removeArtifactManagement( PackagingRule )

    /**
     * Method removeRepository.
     * 
     * @param repository
     */
    public void removeRepository( Repository repository )
    {
        getRepositories().remove( repository );
    } //-- void removeRepository( Repository )

    /**
     * Set this element configures how artifacts should be assigned
     * to individual packages.
     * 
     * @param artifactManagement
     */
    public void setArtifactManagement( java.util.List artifactManagement )
    {
        this.artifactManagement = artifactManagement;
    } //-- void setArtifactManagement( java.util.List )

    /**
     * Set this element contains basic XMvn settings.
     * 
     * @param buildSettings
     */
    public void setBuildSettings( BuildSettings buildSettings )
    {
        this.buildSettings = buildSettings;
    } //-- void setBuildSettings( BuildSettings )

    /**
     * Set this element contains configuration of XMvn installer.
     * 
     * @param installerSettings
     */
    public void setInstallerSettings( InstallerSettings installerSettings )
    {
        this.installerSettings = installerSettings;
    } //-- void setInstallerSettings( InstallerSettings )

    /**
     * Set the modelEncoding field.
     * 
     * @param modelEncoding
     */
    public void setModelEncoding( String modelEncoding )
    {
        this.modelEncoding = modelEncoding;
    } //-- void setModelEncoding( String )

    /**
     * Set this element lists system Java properties that should be
     * set before XMvn build is started.
     * 
     * @param properties
     */
    public void setProperties( java.util.Properties properties )
    {
        this.properties = properties;
    } //-- void setProperties( java.util.Properties )

    /**
     * Set list of repositories. Repositories can be used by
     * resolvers as source of artifacts, by installers as target
     * where artifacts should be installed, or by any other
     * component.
     * 
     * @param repositories
     */
    public void setRepositories( java.util.List repositories )
    {
        this.repositories = repositories;
    } //-- void setRepositories( java.util.List )

    /**
     * Set this element contains configuration of XMvn resolver.
     * 
     * @param resolverSettings
     */
    public void setResolverSettings( ResolverSettings resolverSettings )
    {
        this.resolverSettings = resolverSettings;
    } //-- void setResolverSettings( ResolverSettings )

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy