001    /*
002     =================== DO NOT EDIT THIS FILE ====================
003     Generated by Modello 1.4.1 on 2012-01-20 18:15:43,
004     any modifications will be overwritten.
005     ==============================================================
006     */
007    
008    package org.apache.maven.settings;
009    
010    /**
011     * 
012     *         A download mirror for a given repository.
013     *       
014     * 
015     * @version $Revision$ $Date$
016     */
017    @SuppressWarnings( "all" )
018    public class Mirror
019        extends IdentifiableBase
020        implements java.io.Serializable, java.lang.Cloneable
021    {
022    
023          //--------------------------/
024         //- Class/Member Variables -/
025        //--------------------------/
026    
027        /**
028         * 
029         *             The server ID of the repository being mirrored,
030         * eg
031         *             "central". This MUST NOT match the mirror id.
032         *           
033         */
034        private String mirrorOf;
035    
036        /**
037         * 
038         *             The optional name that describes the mirror.
039         *           
040         */
041        private String name;
042    
043        /**
044         * The URL of the mirror repository.
045         */
046        private String url;
047    
048        /**
049         * The layout of the mirror repository. Since Maven 3.
050         */
051        private String layout;
052    
053        /**
054         * 
055         *             The layouts of repositories being mirrored. This
056         * value can be used to restrict the usage
057         *             of the mirror to repositories with a matching
058         * layout (apart from a matching id). Since Maven 3.
059         *           
060         */
061        private String mirrorOfLayouts = "default,legacy";
062    
063    
064          //-----------/
065         //- Methods -/
066        //-----------/
067    
068        /**
069         * Method clone.
070         * 
071         * @return Mirror
072         */
073        public Mirror clone()
074        {
075            try
076            {
077                Mirror copy = (Mirror) super.clone();
078    
079                return copy;
080            }
081            catch ( java.lang.Exception ex )
082            {
083                throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
084                    + " does not support clone()" ).initCause( ex );
085            }
086        } //-- Mirror clone()
087    
088        /**
089         * Get the layout of the mirror repository. Since Maven 3.
090         * 
091         * @return String
092         */
093        public String getLayout()
094        {
095            return this.layout;
096        } //-- String getLayout()
097    
098        /**
099         * Get the server ID of the repository being mirrored, eg
100         *             "central". This MUST NOT match the mirror id.
101         * 
102         * @return String
103         */
104        public String getMirrorOf()
105        {
106            return this.mirrorOf;
107        } //-- String getMirrorOf()
108    
109        /**
110         * Get the layouts of repositories being mirrored. This value
111         * can be used to restrict the usage
112         *             of the mirror to repositories with a matching
113         * layout (apart from a matching id). Since Maven 3.
114         * 
115         * @return String
116         */
117        public String getMirrorOfLayouts()
118        {
119            return this.mirrorOfLayouts;
120        } //-- String getMirrorOfLayouts()
121    
122        /**
123         * Get the optional name that describes the mirror.
124         * 
125         * @return String
126         */
127        public String getName()
128        {
129            return this.name;
130        } //-- String getName()
131    
132        /**
133         * Get the URL of the mirror repository.
134         * 
135         * @return String
136         */
137        public String getUrl()
138        {
139            return this.url;
140        } //-- String getUrl()
141    
142        /**
143         * Set the layout of the mirror repository. Since Maven 3.
144         * 
145         * @param layout
146         */
147        public void setLayout( String layout )
148        {
149            this.layout = layout;
150        } //-- void setLayout( String )
151    
152        /**
153         * Set the server ID of the repository being mirrored, eg
154         *             "central". This MUST NOT match the mirror id.
155         * 
156         * @param mirrorOf
157         */
158        public void setMirrorOf( String mirrorOf )
159        {
160            this.mirrorOf = mirrorOf;
161        } //-- void setMirrorOf( String )
162    
163        /**
164         * Set the layouts of repositories being mirrored. This value
165         * can be used to restrict the usage
166         *             of the mirror to repositories with a matching
167         * layout (apart from a matching id). Since Maven 3.
168         * 
169         * @param mirrorOfLayouts
170         */
171        public void setMirrorOfLayouts( String mirrorOfLayouts )
172        {
173            this.mirrorOfLayouts = mirrorOfLayouts;
174        } //-- void setMirrorOfLayouts( String )
175    
176        /**
177         * Set the optional name that describes the mirror.
178         * 
179         * @param name
180         */
181        public void setName( String name )
182        {
183            this.name = name;
184        } //-- void setName( String )
185    
186        /**
187         * Set the URL of the mirror repository.
188         * 
189         * @param url
190         */
191        public void setUrl( String url )
192        {
193            this.url = url;
194        } //-- void setUrl( String )
195    
196        
197                
198    
199        public String toString()
200        {
201            StringBuilder sb = new StringBuilder( 128 );
202            sb.append( "Mirror[" );
203            sb.append( "id=" ).append( this.getId() );
204            sb.append( ",mirrorOf=" ).append( mirrorOf );
205            sb.append( ",url=" ).append( this.url );
206            sb.append( ",name=" ).append( this.name );
207            sb.append( "]" );
208            return sb.toString();
209        }
210                
211              
212    }