001 // =================== DO NOT EDIT THIS FILE ====================
002 // Generated by Modello 1.7,
003 // any modifications will be overwritten.
004 // ==============================================================
005
006 package org.apache.maven.settings;
007
008 /**
009 *
010 * A download mirror for a given repository.
011 *
012 *
013 * @version $Revision$ $Date$
014 */
015 @SuppressWarnings( "all" )
016 public class Mirror
017 extends IdentifiableBase
018 implements java.io.Serializable, java.lang.Cloneable
019 {
020
021 //--------------------------/
022 //- Class/Member Variables -/
023 //--------------------------/
024
025 /**
026 *
027 * The server ID of the repository being mirrored,
028 * eg
029 * "central". This MUST NOT match the mirror id.
030 *
031 */
032 private String mirrorOf;
033
034 /**
035 *
036 * The optional name that describes the mirror.
037 *
038 */
039 private String name;
040
041 /**
042 * The URL of the mirror repository.
043 */
044 private String url;
045
046 /**
047 * The layout of the mirror repository. Since Maven 3.
048 */
049 private String layout = "default";
050
051 /**
052 *
053 * The layouts of repositories being mirrored. This
054 * value can be used to restrict the usage
055 * of the mirror to repositories with a matching
056 * layout (apart from a matching id). Since Maven 3.
057 *
058 */
059 private String mirrorOfLayouts = "default,legacy";
060
061
062 //-----------/
063 //- Methods -/
064 //-----------/
065
066 /**
067 * Method clone.
068 *
069 * @return Mirror
070 */
071 public Mirror clone()
072 {
073 try
074 {
075 Mirror copy = (Mirror) super.clone();
076
077 return copy;
078 }
079 catch ( java.lang.Exception ex )
080 {
081 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
082 + " does not support clone()" ).initCause( ex );
083 }
084 } //-- Mirror clone()
085
086 /**
087 * Get the layout of the mirror repository. Since Maven 3.
088 *
089 * @return String
090 */
091 public String getLayout()
092 {
093 return this.layout;
094 } //-- String getLayout()
095
096 /**
097 * Get the server ID of the repository being mirrored, eg
098 * "central". This MUST NOT match the mirror id.
099 *
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 }