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

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

Go to download

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

The newest version!
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 2.4.0,
// any modifications will be overwritten.
// ==============================================================

package org.fedoraproject.xmvn.config;

/**
 * XMvn settings related to resolution of artifacts.
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class ResolverSettings
    implements java.io.Serializable, java.lang.Cloneable
{

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

    /**
     * Whether detailed debugging information about artifact
     * resolution process should be logged.
     */
    private Boolean debug;

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

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

    /**
     * Whether XMvn should refuse to resolve artifact that have
     * more than a single piece of metadata.
     */
    private Boolean ignoreDuplicateMetadata;

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

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


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

    /**
     * Method addBlacklist.
     * 
     * @param artifact a artifact object.
     */
    public void addBlacklist( Artifact artifact )
    {
        getBlacklist().add( artifact );
    } //-- void addBlacklist( Artifact )

    /**
     * Method addLocalRepository.
     * 
     * @param string a string object.
     */
    public void addLocalRepository( String string )
    {
        getLocalRepositories().add( string );
    } //-- void addLocalRepository( String )

    /**
     * Method addMetadataRepository.
     * 
     * @param string a string object.
     */
    public void addMetadataRepository( String string )
    {
        getMetadataRepositories().add( string );
    } //-- void addMetadataRepository( String )

    /**
     * Method addPrefix.
     * 
     * @param string a string object.
     */
    public void addPrefix( String string )
    {
        getPrefixes().add( string );
    } //-- void addPrefix( String )

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

            if ( this.localRepositories != null )
            {
                copy.localRepositories = new java.util.ArrayList();
                copy.localRepositories.addAll( this.localRepositories );
            }

            if ( this.metadataRepositories != null )
            {
                copy.metadataRepositories = new java.util.ArrayList();
                copy.metadataRepositories.addAll( this.metadataRepositories );
            }

            if ( this.prefixes != null )
            {
                copy.prefixes = new java.util.ArrayList();
                copy.prefixes.addAll( this.prefixes );
            }

            if ( this.blacklist != null )
            {
                copy.blacklist = new java.util.ArrayList();
                for ( Artifact item : this.blacklist )
                {
                    copy.blacklist.add( ( (Artifact) 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 );
        }
    } //-- ResolverSettings clone()

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

        return this.blacklist;
    } //-- java.util.List getBlacklist()

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

        return this.localRepositories;
    } //-- java.util.List getLocalRepositories()

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

        return this.metadataRepositories;
    } //-- java.util.List getMetadataRepositories()

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

        return this.prefixes;
    } //-- java.util.List getPrefixes()

    /**
     * Get whether detailed debugging information about artifact
     * resolution process should be logged.
     * 
     * @return Boolean
     */
    public Boolean isDebug()
    {
        return this.debug;
    } //-- Boolean isDebug()

    /**
     * Get whether XMvn should refuse to resolve artifact that have
     * more than a single piece of metadata.
     * 
     * @return Boolean
     */
    public Boolean isIgnoreDuplicateMetadata()
    {
        return this.ignoreDuplicateMetadata;
    } //-- Boolean isIgnoreDuplicateMetadata()

    /**
     * Method removeBlacklist.
     * 
     * @param artifact a artifact object.
     */
    public void removeBlacklist( Artifact artifact )
    {
        getBlacklist().remove( artifact );
    } //-- void removeBlacklist( Artifact )

    /**
     * Method removeLocalRepository.
     * 
     * @param string a string object.
     */
    public void removeLocalRepository( String string )
    {
        getLocalRepositories().remove( string );
    } //-- void removeLocalRepository( String )

    /**
     * Method removeMetadataRepository.
     * 
     * @param string a string object.
     */
    public void removeMetadataRepository( String string )
    {
        getMetadataRepositories().remove( string );
    } //-- void removeMetadataRepository( String )

    /**
     * Method removePrefix.
     * 
     * @param string a string object.
     */
    public void removePrefix( String string )
    {
        getPrefixes().remove( string );
    } //-- void removePrefix( String )

    /**
     * Set list of blacklisted artifacts which will not be
     * resolved.
     * 
     * @param blacklist a blacklist object.
     */
    public void setBlacklist( java.util.List blacklist )
    {
        this.blacklist = blacklist;
    } //-- void setBlacklist( java.util.List )

    /**
     * Set whether detailed debugging information about artifact
     * resolution process should be logged.
     * 
     * @param debug a debug object.
     */
    public void setDebug( Boolean debug )
    {
        this.debug = debug;
    } //-- void setDebug( Boolean )

    /**
     * Set whether XMvn should refuse to resolve artifact that have
     * more than a single piece of metadata.
     * 
     * @param ignoreDuplicateMetadata a ignoreDuplicateMetadata
     * object.
     */
    public void setIgnoreDuplicateMetadata( Boolean ignoreDuplicateMetadata )
    {
        this.ignoreDuplicateMetadata = ignoreDuplicateMetadata;
    } //-- void setIgnoreDuplicateMetadata( Boolean )

    /**
     * Set list of local repositories where XMvn will look for
     * artifacts.
     * 
     * @param localRepositories a localRepositories object.
     */
    public void setLocalRepositories( java.util.List localRepositories )
    {
        this.localRepositories = localRepositories;
    } //-- void setLocalRepositories( java.util.List )

    /**
     * Set list of repositories where XMvn will look for metadata
     * files.
     * 
     * @param metadataRepositories a metadataRepositories object.
     */
    public void setMetadataRepositories( java.util.List metadataRepositories )
    {
        this.metadataRepositories = metadataRepositories;
    } //-- void setMetadataRepositories( java.util.List )

    /**
     * Set list of prefixes that XMvn resolver will prepend to
     * system repositories.
     * 
     * @param prefixes a prefixes object.
     */
    public void setPrefixes( java.util.List prefixes )
    {
        this.prefixes = prefixes;
    } //-- void setPrefixes( java.util.List )

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy