View Javadoc

1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.7,
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       * eg
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       //- Methods -/
64      //-----------/
65  
66      /**
67       * Method clone.
68       * 
69       * @return Mirror
70       */
71      public Mirror clone()
72      {
73          try
74          {
75              Mirror copy = (Mirror) super.clone();
76  
77              return copy;
78          }
79          catch ( java.lang.Exception ex )
80          {
81              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
82                  + " does not support clone()" ).initCause( ex );
83          }
84      } //-- Mirror clone()
85  
86      /**
87       * Get the layout of the mirror repository. Since Maven 3.
88       * 
89       * @return String
90       */
91      public String getLayout()
92      {
93          return this.layout;
94      } //-- String getLayout()
95  
96      /**
97       * Get the server ID of the repository being mirrored, eg
98       *             "central". This MUST NOT match the mirror id.
99       * 
100      * @return String
101      */
102     public String getMirrorOf()
103     {
104         return this.mirrorOf;
105     } //-- String getMirrorOf()
106 
107     /**
108      * Get the layouts of repositories being mirrored. This value
109      * can be used to restrict the usage
110      *             of the mirror to repositories with a matching
111      * layout (apart from a matching id). Since Maven 3.
112      * 
113      * @return String
114      */
115     public String getMirrorOfLayouts()
116     {
117         return this.mirrorOfLayouts;
118     } //-- String getMirrorOfLayouts()
119 
120     /**
121      * Get the optional name that describes the mirror.
122      * 
123      * @return String
124      */
125     public String getName()
126     {
127         return this.name;
128     } //-- String getName()
129 
130     /**
131      * Get the URL of the mirror repository.
132      * 
133      * @return String
134      */
135     public String getUrl()
136     {
137         return this.url;
138     } //-- String getUrl()
139 
140     /**
141      * Set the layout of the mirror repository. Since Maven 3.
142      * 
143      * @param layout
144      */
145     public void setLayout( String layout )
146     {
147         this.layout = layout;
148     } //-- void setLayout( String )
149 
150     /**
151      * Set the server ID of the repository being mirrored, eg
152      *             "central". This MUST NOT match the mirror id.
153      * 
154      * @param mirrorOf
155      */
156     public void setMirrorOf( String mirrorOf )
157     {
158         this.mirrorOf = mirrorOf;
159     } //-- void setMirrorOf( String )
160 
161     /**
162      * Set the layouts of repositories being mirrored. This value
163      * can be used to restrict the usage
164      *             of the mirror to repositories with a matching
165      * layout (apart from a matching id). Since Maven 3.
166      * 
167      * @param mirrorOfLayouts
168      */
169     public void setMirrorOfLayouts( String mirrorOfLayouts )
170     {
171         this.mirrorOfLayouts = mirrorOfLayouts;
172     } //-- void setMirrorOfLayouts( String )
173 
174     /**
175      * Set the optional name that describes the mirror.
176      * 
177      * @param name
178      */
179     public void setName( String name )
180     {
181         this.name = name;
182     } //-- void setName( String )
183 
184     /**
185      * Set the URL of the mirror repository.
186      * 
187      * @param url
188      */
189     public void setUrl( String url )
190     {
191         this.url = url;
192     } //-- void setUrl( String )
193 
194     
195             
196 
197     public String toString()
198     {
199         StringBuilder sb = new StringBuilder( 128 );
200         sb.append( "Mirror[" );
201         sb.append( "id=" ).append( this.getId() );
202         sb.append( ",mirrorOf=" ).append( mirrorOf );
203         sb.append( ",url=" ).append( this.url );
204         sb.append( ",name=" ).append( this.name );
205         sb.append( "]" );
206         return sb.toString();
207     }
208             
209           
210 }