View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-01-20 18:05:12,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.settings;
9   
10  /**
11   * 
12   *         A download mirror for a given repository.
13   *       
14   * 
15   * @version $Revision$ $Date$
16   */
17  @SuppressWarnings( "all" )
18  public class Mirror
19      extends IdentifiableBase
20      implements java.io.Serializable, java.lang.Cloneable
21  {
22  
23        //--------------------------/
24       //- Class/Member Variables -/
25      //--------------------------/
26  
27      /**
28       * 
29       *             The server ID of the repository being mirrored,
30       * eg
31       *             "central". This MUST NOT match the mirror id.
32       *           
33       */
34      private String mirrorOf;
35  
36      /**
37       * 
38       *             The optional name that describes the mirror.
39       *           
40       */
41      private String name;
42  
43      /**
44       * The URL of the mirror repository.
45       */
46      private String url;
47  
48      /**
49       * The layout of the mirror repository. Since Maven 3.
50       */
51      private String layout;
52  
53      /**
54       * 
55       *             The layouts of repositories being mirrored. This
56       * value can be used to restrict the usage
57       *             of the mirror to repositories with a matching
58       * layout (apart from a matching id). Since Maven 3.
59       *           
60       */
61      private String mirrorOfLayouts = "default,legacy";
62  
63  
64        //-----------/
65       //- Methods -/
66      //-----------/
67  
68      /**
69       * Method clone.
70       * 
71       * @return Mirror
72       */
73      public Mirror clone()
74      {
75          try
76          {
77              Mirror copy = (Mirror) super.clone();
78  
79              return copy;
80          }
81          catch ( java.lang.Exception ex )
82          {
83              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
84                  + " does not support clone()" ).initCause( ex );
85          }
86      } //-- Mirror clone()
87  
88      /**
89       * Get the layout of the mirror repository. Since Maven 3.
90       * 
91       * @return String
92       */
93      public String getLayout()
94      {
95          return this.layout;
96      } //-- String getLayout()
97  
98      /**
99       * 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 }