View Javadoc

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   *         
16   *         The <code>&lt;server&gt;</code> element contains
17   * informations required to a server settings.
18   *         
19   * 
20   * @version $Revision$ $Date$
21   */
22  public class Server extends IdentifiableBase 
23  implements java.io.Serializable
24  {
25  
26  
27        //--------------------------/
28       //- Class/Member Variables -/
29      //--------------------------/
30  
31      /**
32       * 
33       *             
34       *             The username used to authenticate.
35       *             
36       *           
37       */
38      private String username;
39  
40      /**
41       * 
42       *             
43       *             The password used in conjunction with the
44       * username to authenticate.
45       *             
46       *           
47       */
48      private String password;
49  
50      /**
51       * 
52       *             
53       *             The private key location used to authenticate.
54       *             
55       *           
56       */
57      private String privateKey;
58  
59      /**
60       * 
61       *             
62       *             The passphrase used in conjunction with the
63       * privateKey to authenticate.
64       *             
65       *           
66       */
67      private String passphrase;
68  
69      /**
70       * 
71       *             
72       *             The permissions for files when they are created.
73       *             
74       *           
75       */
76      private String filePermissions;
77  
78      /**
79       * 
80       *             
81       *             The permissions for directories when they are
82       * created.
83       *             
84       *           
85       */
86      private String directoryPermissions;
87  
88      /**
89       * 
90       *             
91       *             Extra configuration for the transport layer.
92       *             
93       *           
94       */
95      private Object configuration;
96  
97  
98        //-----------/
99       //- Methods -/
100     //-----------/
101 
102     /**
103      * Get 
104      *             
105      *             Extra configuration for the transport layer.
106      *             
107      *           
108      * 
109      * @return Object
110      */
111     public Object getConfiguration()
112     {
113         return this.configuration;
114     } //-- Object getConfiguration() 
115 
116     /**
117      * Get 
118      *             
119      *             The permissions for directories when they are
120      * created.
121      *             
122      *           
123      * 
124      * @return String
125      */
126     public String getDirectoryPermissions()
127     {
128         return this.directoryPermissions;
129     } //-- String getDirectoryPermissions() 
130 
131     /**
132      * Get 
133      *             
134      *             The permissions for files when they are created.
135      *             
136      *           
137      * 
138      * @return String
139      */
140     public String getFilePermissions()
141     {
142         return this.filePermissions;
143     } //-- String getFilePermissions() 
144 
145     /**
146      * Get 
147      *             
148      *             The passphrase used in conjunction with the
149      * privateKey to authenticate.
150      *             
151      *           
152      * 
153      * @return String
154      */
155     public String getPassphrase()
156     {
157         return this.passphrase;
158     } //-- String getPassphrase() 
159 
160     /**
161      * Get 
162      *             
163      *             The password used in conjunction with the
164      * username to authenticate.
165      *             
166      *           
167      * 
168      * @return String
169      */
170     public String getPassword()
171     {
172         return this.password;
173     } //-- String getPassword() 
174 
175     /**
176      * Get 
177      *             
178      *             The private key location used to authenticate.
179      *             
180      *           
181      * 
182      * @return String
183      */
184     public String getPrivateKey()
185     {
186         return this.privateKey;
187     } //-- String getPrivateKey() 
188 
189     /**
190      * Get 
191      *             
192      *             The username used to authenticate.
193      *             
194      *           
195      * 
196      * @return String
197      */
198     public String getUsername()
199     {
200         return this.username;
201     } //-- String getUsername() 
202 
203     /**
204      * Set 
205      *             
206      *             Extra configuration for the transport layer.
207      *             
208      *           
209      * 
210      * @param configuration
211      */
212     public void setConfiguration( Object configuration )
213     {
214         this.configuration = configuration;
215     } //-- void setConfiguration( Object ) 
216 
217     /**
218      * Set 
219      *             
220      *             The permissions for directories when they are
221      * created.
222      *             
223      *           
224      * 
225      * @param directoryPermissions
226      */
227     public void setDirectoryPermissions( String directoryPermissions )
228     {
229         this.directoryPermissions = directoryPermissions;
230     } //-- void setDirectoryPermissions( String ) 
231 
232     /**
233      * Set 
234      *             
235      *             The permissions for files when they are created.
236      *             
237      *           
238      * 
239      * @param filePermissions
240      */
241     public void setFilePermissions( String filePermissions )
242     {
243         this.filePermissions = filePermissions;
244     } //-- void setFilePermissions( String ) 
245 
246     /**
247      * Set 
248      *             
249      *             The passphrase used in conjunction with the
250      * privateKey to authenticate.
251      *             
252      *           
253      * 
254      * @param passphrase
255      */
256     public void setPassphrase( String passphrase )
257     {
258         this.passphrase = passphrase;
259     } //-- void setPassphrase( String ) 
260 
261     /**
262      * Set 
263      *             
264      *             The password used in conjunction with the
265      * username to authenticate.
266      *             
267      *           
268      * 
269      * @param password
270      */
271     public void setPassword( String password )
272     {
273         this.password = password;
274     } //-- void setPassword( String ) 
275 
276     /**
277      * Set 
278      *             
279      *             The private key location used to authenticate.
280      *             
281      *           
282      * 
283      * @param privateKey
284      */
285     public void setPrivateKey( String privateKey )
286     {
287         this.privateKey = privateKey;
288     } //-- void setPrivateKey( String ) 
289 
290     /**
291      * Set 
292      *             
293      *             The username used to authenticate.
294      *             
295      *           
296      * 
297      * @param username
298      */
299     public void setUsername( String username )
300     {
301         this.username = username;
302     } //-- void setUsername( String ) 
303 
304 
305     private String modelEncoding = "UTF-8";
306 
307     /**
308      * Set an encoding used for reading/writing the model.
309      *
310      * @param modelEncoding the encoding used when reading/writing the model.
311      */
312     public void setModelEncoding( String modelEncoding )
313     {
314         this.modelEncoding = modelEncoding;
315     }
316 
317     /**
318      * @return the current encoding used when reading/writing this model.
319      */
320     public String getModelEncoding()
321     {
322         return modelEncoding;
323     }
324 }