View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.11,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.settings;
7   
8   /**
9    * 
10   *         A download mirror for a given repository.
11   *       
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings( "all" )
16  public class Mirror
17      extends IdentifiableBase
18      implements java.io.Serializable, java.lang.Cloneable
19  {
20  
21        //--------------------------/
22       //- Class/Member Variables -/
23      //--------------------------/
24  
25      /**
26       * 
27       *             The server ID of the repository being mirrored,
28       * e.g.,
29       *             "central". This MUST NOT match the mirror id.
30       *           
31       */
32      private String mirrorOf;
33  
34      /**
35       * 
36       *             The optional name that describes the mirror.
37       *           
38       */
39      private String name;
40  
41      /**
42       * The URL of the mirror repository.
43       */
44      private String url;
45  
46      /**
47       * The layout of the mirror repository. Since Maven 3.
48       */
49      private String layout = "default";
50  
51      /**
52       * 
53       *             The layouts of repositories being mirrored. This
54       * value can be used to restrict the usage
55       *             of the mirror to repositories with a matching
56       * layout (apart from a matching id). Since Maven 3.
57       *           
58       */
59      private String mirrorOfLayouts = "default,legacy";
60  
61      /**
62       * 
63       *             Whether this mirror should be blocked from any
64       * download request but fail the download process, explaining
65       * why.
66       *           
67       */
68      private boolean blocked = false;
69  
70  
71        //-----------/
72       //- Methods -/
73      //-----------/
74  
75      /**
76       * Method clone.
77       * 
78       * @return Mirror
79       */
80      public Mirror clone()
81      {
82          try
83          {
84              Mirror copy = (Mirror) super.clone();
85  
86              return copy;
87          }
88          catch ( java.lang.Exception ex )
89          {
90              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
91                  + " does not support clone()" ).initCause( ex );
92          }
93      } //-- Mirror clone()
94  
95      /**
96       * Get the layout of the mirror repository. Since Maven 3.
97       * 
98       * @return String
99       */
100     public String getLayout()
101     {
102         return this.layout;
103     } //-- String getLayout()
104 
105     /**
106      * Get the server ID of the repository being mirrored, e.g.,
107      *             "central". This MUST NOT match the mirror id.
108      * 
109      * @return String
110      */
111     public String getMirrorOf()
112     {
113         return this.mirrorOf;
114     } //-- String getMirrorOf()
115 
116     /**
117      * Get the layouts of repositories being mirrored. This value
118      * can be used to restrict the usage
119      *             of the mirror to repositories with a matching
120      * layout (apart from a matching id). Since Maven 3.
121      * 
122      * @return String
123      */
124     public String getMirrorOfLayouts()
125     {
126         return this.mirrorOfLayouts;
127     } //-- String getMirrorOfLayouts()
128 
129     /**
130      * Get the optional name that describes the mirror.
131      * 
132      * @return String
133      */
134     public String getName()
135     {
136         return this.name;
137     } //-- String getName()
138 
139     /**
140      * Get the URL of the mirror repository.
141      * 
142      * @return String
143      */
144     public String getUrl()
145     {
146         return this.url;
147     } //-- String getUrl()
148 
149     /**
150      * Get whether this mirror should be blocked from any download
151      * request but fail the download process, explaining why.
152      * 
153      * @return boolean
154      */
155     public boolean isBlocked()
156     {
157         return this.blocked;
158     } //-- boolean isBlocked()
159 
160     /**
161      * Set whether this mirror should be blocked from any download
162      * request but fail the download process, explaining why.
163      * 
164      * @param blocked
165      */
166     public void setBlocked( boolean blocked )
167     {
168         this.blocked = blocked;
169     } //-- void setBlocked( boolean )
170 
171     /**
172      * Set the layout of the mirror repository. Since Maven 3.
173      * 
174      * @param layout
175      */
176     public void setLayout( String layout )
177     {
178         this.layout = layout;
179     } //-- void setLayout( String )
180 
181     /**
182      * Set the server ID of the repository being mirrored, e.g.,
183      *             "central". This MUST NOT match the mirror id.
184      * 
185      * @param mirrorOf
186      */
187     public void setMirrorOf( String mirrorOf )
188     {
189         this.mirrorOf = mirrorOf;
190     } //-- void setMirrorOf( String )
191 
192     /**
193      * Set the layouts of repositories being mirrored. This value
194      * can be used to restrict the usage
195      *             of the mirror to repositories with a matching
196      * layout (apart from a matching id). Since Maven 3.
197      * 
198      * @param mirrorOfLayouts
199      */
200     public void setMirrorOfLayouts( String mirrorOfLayouts )
201     {
202         this.mirrorOfLayouts = mirrorOfLayouts;
203     } //-- void setMirrorOfLayouts( String )
204 
205     /**
206      * Set the optional name that describes the mirror.
207      * 
208      * @param name
209      */
210     public void setName( String name )
211     {
212         this.name = name;
213     } //-- void setName( String )
214 
215     /**
216      * Set the URL of the mirror repository.
217      * 
218      * @param url
219      */
220     public void setUrl( String url )
221     {
222         this.url = url;
223     } //-- void setUrl( String )
224 
225     
226             
227 
228     public String toString()
229     {
230         StringBuilder sb = new StringBuilder( 128 );
231         sb.append( "Mirror[" );
232         sb.append( "id=" ).append( this.getId() );
233         sb.append( ",mirrorOf=" ).append( mirrorOf );
234         sb.append( ",url=" ).append( this.url );
235         sb.append( ",name=" ).append( this.name );
236         if ( isBlocked() )
237         {
238             sb.append( ",blocked" );
239         }
240         sb.append( "]" );
241         return sb.toString();
242     }
243             
244           
245 }