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

org.apache.maven.settings.Mirror 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.settings;

/**
 * 
 *         A download mirror for a given repository.
 *       
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class Mirror
    extends IdentifiableBase
    implements java.io.Serializable, java.lang.Cloneable
{

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

    /**
     * 
     *             The server ID of the repository being mirrored,
     * e.g.,
     *             "central". This MUST NOT match the mirror id.
     *           
     */
    private String mirrorOf;

    /**
     * 
     *             The optional name that describes the mirror.
     *           
     */
    private String name;

    /**
     * The URL of the mirror repository.
     */
    private String url;

    /**
     * The layout of the mirror repository. Since Maven 3.
     */
    private String layout = "default";

    /**
     * 
     *             The layouts of repositories being mirrored. This
     * value can be used to restrict the usage
     *             of the mirror to repositories with a matching
     * layout (apart from a matching id). Since Maven 3.
     *           
     */
    private String mirrorOfLayouts = "default,legacy";

    /**
     * 
     *             Whether this mirror should be blocked from any
     * download request but fail the download process, explaining
     * why.
     *           
     */
    private boolean blocked = false;


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

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

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

    /**
     * Get the layout of the mirror repository. Since Maven 3.
     * 
     * @return String
     */
    public String getLayout()
    {
        return this.layout;
    } //-- String getLayout()

    /**
     * Get the server ID of the repository being mirrored, e.g.,
     *             "central". This MUST NOT match the mirror id.
     * 
     * @return String
     */
    public String getMirrorOf()
    {
        return this.mirrorOf;
    } //-- String getMirrorOf()

    /**
     * Get the layouts of repositories being mirrored. This value
     * can be used to restrict the usage
     *             of the mirror to repositories with a matching
     * layout (apart from a matching id). Since Maven 3.
     * 
     * @return String
     */
    public String getMirrorOfLayouts()
    {
        return this.mirrorOfLayouts;
    } //-- String getMirrorOfLayouts()

    /**
     * Get the optional name that describes the mirror.
     * 
     * @return String
     */
    public String getName()
    {
        return this.name;
    } //-- String getName()

    /**
     * Get the URL of the mirror repository.
     * 
     * @return String
     */
    public String getUrl()
    {
        return this.url;
    } //-- String getUrl()

    /**
     * Get whether this mirror should be blocked from any download
     * request but fail the download process, explaining why.
     * 
     * @return boolean
     */
    public boolean isBlocked()
    {
        return this.blocked;
    } //-- boolean isBlocked()

    /**
     * Set whether this mirror should be blocked from any download
     * request but fail the download process, explaining why.
     * 
     * @param blocked a blocked object.
     */
    public void setBlocked( boolean blocked )
    {
        this.blocked = blocked;
    } //-- void setBlocked( boolean )

    /**
     * Set the layout of the mirror repository. Since Maven 3.
     * 
     * @param layout a layout object.
     */
    public void setLayout( String layout )
    {
        this.layout = layout;
    } //-- void setLayout( String )

    /**
     * Set the server ID of the repository being mirrored, e.g.,
     *             "central". This MUST NOT match the mirror id.
     * 
     * @param mirrorOf a mirrorOf object.
     */
    public void setMirrorOf( String mirrorOf )
    {
        this.mirrorOf = mirrorOf;
    } //-- void setMirrorOf( String )

    /**
     * Set the layouts of repositories being mirrored. This value
     * can be used to restrict the usage
     *             of the mirror to repositories with a matching
     * layout (apart from a matching id). Since Maven 3.
     * 
     * @param mirrorOfLayouts a mirrorOfLayouts object.
     */
    public void setMirrorOfLayouts( String mirrorOfLayouts )
    {
        this.mirrorOfLayouts = mirrorOfLayouts;
    } //-- void setMirrorOfLayouts( String )

    /**
     * Set the optional name that describes the mirror.
     * 
     * @param name a name object.
     */
    public void setName( String name )
    {
        this.name = name;
    } //-- void setName( String )

    /**
     * Set the URL of the mirror repository.
     * 
     * @param url a url object.
     */
    public void setUrl( String url )
    {
        this.url = url;
    } //-- void setUrl( String )

    
            

    public String toString()
    {
        StringBuilder sb = new StringBuilder( 128 );
        sb.append( "Mirror[" );
        sb.append( "id=" ).append( this.getId() );
        sb.append( ",mirrorOf=" ).append( mirrorOf );
        sb.append( ",url=" ).append( this.url );
        sb.append( ",name=" ).append( this.name );
        if ( isBlocked() )
        {
            sb.append( ",blocked" );
        }
        sb.append( "]" );
        return sb.toString();
    }
            
          
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy