1 /*
2 * $Id$
3 */
4
5 package org.apache.maven.settings;
6
7 //---------------------------------/
8 //- Imported classes and packages -/
9 //---------------------------------/
10
11 import java.util.Date;
12
13 /**
14 *
15 * A download mirror for a given repository.
16 *
17 *
18 * @version $Revision$ $Date$
19 */
20 public class Mirror extends IdentifiableBase
21 implements java.io.Serializable
22 {
23
24
25 //--------------------------/
26 //- Class/Member Variables -/
27 //--------------------------/
28
29 /**
30 *
31 * The server ID of the repository being mirrored,
32 * eg
33 * "central". This MUST NOT match the mirror id.
34 *
35 */
36 private String mirrorOf;
37
38 /**
39 *
40 * The optional name that describes the mirror.
41 *
42 */
43 private String name;
44
45 /**
46 * The URL of the mirror repository.
47 */
48 private String url;
49
50
51 //-----------/
52 //- Methods -/
53 //-----------/
54
55 /**
56 * Get
57 * The server ID of the repository being mirrored,
58 * eg
59 * "central". This MUST NOT match the mirror id.
60 *
61 *
62 * @return String
63 */
64 public String getMirrorOf()
65 {
66 return this.mirrorOf;
67 } //-- String getMirrorOf()
68
69 /**
70 * Get
71 * The optional name that describes the mirror.
72 *
73 *
74 * @return String
75 */
76 public String getName()
77 {
78 return this.name;
79 } //-- String getName()
80
81 /**
82 * Get the URL of the mirror repository.
83 *
84 * @return String
85 */
86 public String getUrl()
87 {
88 return this.url;
89 } //-- String getUrl()
90
91 /**
92 * Set
93 * The server ID of the repository being mirrored,
94 * eg
95 * "central". This MUST NOT match the mirror id.
96 *
97 *
98 * @param mirrorOf
99 */
100 public void setMirrorOf( String mirrorOf )
101 {
102 this.mirrorOf = mirrorOf;
103 } //-- void setMirrorOf( String )
104
105 /**
106 * Set
107 * The optional name that describes the mirror.
108 *
109 *
110 * @param name
111 */
112 public void setName( String name )
113 {
114 this.name = name;
115 } //-- void setName( String )
116
117 /**
118 * Set the URL of the mirror repository.
119 *
120 * @param url
121 */
122 public void setUrl( String url )
123 {
124 this.url = url;
125 } //-- void setUrl( String )
126
127
128 private String modelEncoding = "UTF-8";
129
130 /**
131 * Set an encoding used for reading/writing the model.
132 *
133 * @param modelEncoding the encoding used when reading/writing the model.
134 */
135 public void setModelEncoding( String modelEncoding )
136 {
137 this.modelEncoding = modelEncoding;
138 }
139
140 /**
141 * @return the current encoding used when reading/writing this model.
142 */
143 public String getModelEncoding()
144 {
145 return modelEncoding;
146 }
147 }