KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hammurapi > ServerEntry


1 /*
2   * Hammurapi
3  * Automated Java code review system.
4  * Copyright (C) 2004 Hammurapi Group
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  * URL: http://www.hammurapi.org
21  * e-Mail: support@hammurapi.biz
22  */

23 package org.hammurapi;
24
25 /**
26  * Defines connection to a Hypersonic server.
27  * @ant.element name="Hypersonic server"
28  * @author Pavel Vlasov
29  * @version $Revision: 1.2 $
30  */

31 public class ServerEntry {
32
33     private String JavaDoc host="localhost";
34     private String JavaDoc user="sa";
35     private String JavaDoc password="";
36
37     /**
38      * Host name. Defaults to "localhost"
39      * @param host The host to set.
40      * @ant.non-required
41      */

42     public void setHost(String JavaDoc host) {
43         this.host = host;
44     }
45     
46     /**
47      * Password. Defaults to blank string.
48      * @param password The password to set.
49      * @ant.non-required
50      */

51     public void setPassword(String JavaDoc password) {
52         this.password = password;
53     }
54     
55     /**
56      * User. Defaults to "sa"
57      * @param user The user to set.
58      * @ant.non-required
59      */

60     public void setUser(String JavaDoc user) {
61         this.user = user;
62     }
63     /**
64      * @param host
65      * @param user
66      * @param password
67      */

68     public ServerEntry(String JavaDoc host, String JavaDoc user, String JavaDoc password) {
69         if (host!=null) {
70             this.host=host;
71         }
72         
73         if (user!=null) {
74             this.user=user;
75         }
76         
77         if (password!=null) {
78             this.password=password;
79         }
80     }
81
82     /**
83      * @return
84      */

85     public String JavaDoc getPassword() {
86         return password;
87     }
88
89     /**
90      * @return
91      */

92     public String JavaDoc getUser() {
93         return user;
94     }
95
96     /**
97      * @return
98      */

99     public String JavaDoc getHost() {
100         return host;
101     }
102
103 }
104
Popular Tags