KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > messenger > plugin > ForumsSettings


1 package org.jivesoftware.messenger.plugin;
2
3 import com.opensymphony.forums.ws.AuthContext;
4 import org.jivesoftware.util.JiveGlobals;
5
6 /**
7  * User: patrick
8  * Date: Jul 22, 2005
9  * Time: 4:09:01 PM
10  */

11 public class ForumsSettings {
12
13     String JavaDoc url;
14     String JavaDoc username;
15     String JavaDoc password;
16
17     public ForumsSettings() {
18         url = JiveGlobals.getProperty("forums.url", "http://localhost:8080/forums/webservices");
19         username = JiveGlobals.getProperty("forums.username", "admin");
20         password = JiveGlobals.getProperty("forums.password", "admin");
21     }
22
23     public String JavaDoc getUrl() {
24         return url;
25     }
26
27     public void setUrl(String JavaDoc url) {
28         this.url = url;
29     }
30
31     public String JavaDoc getUsername() {
32         return username;
33     }
34
35     public void setUsername(String JavaDoc username) {
36         this.username = username;
37     }
38
39     public String JavaDoc getPassword() {
40         return password;
41     }
42
43     public void setPassword(String JavaDoc password) {
44         this.password = password;
45     }
46
47     public AuthContext getContext() {
48         AuthContext ac = new AuthContext();
49         ac.setUsername(username);
50         ac.setPassword(password);
51         return ac;
52     }
53 }
54
Popular Tags