KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > vfs > authentication > AuthInfo


1 /*
2  * The contents of this file are subject to the
3  * Mozilla Public License Version 1.1 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS"
8  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
9  * See the License for the specific language governing rights and
10  * limitations under the License.
11  *
12  * The Initial Developer of the Original Code is Simulacra Media Ltd.
13  * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14  *
15  * All Rights Reserved.
16  *
17  * Contributor(s):
18  */

19 package org.openharmonise.vfs.authentication;
20
21 /**
22  * Class to wrap up authentication information.
23  *
24  * @author Matthew Large
25  * @version $Revision: 1.1 $
26  *
27  */

28 public class AuthInfo {
29     
30     /**
31      * Username
32      */

33     private String JavaDoc m_sUsername = null;
34     
35     /**
36      * Password
37      */

38     private String JavaDoc m_sPassword = null;
39     
40     /**
41      * Path to the virtual file for the principal representing this user.
42      */

43     private String JavaDoc m_sUserPath = null;
44     
45     /**
46      * User object
47      */

48     private VFSUser m_user = null;
49
50     /**
51      *
52      */

53     public AuthInfo() {
54         super();
55     }
56     
57     /**
58      * Adds a username to the authentication infromation.
59      *
60      * @param sUsername Username to add
61      */

62     public void setUsername(String JavaDoc sUsername) {
63         this.m_sUsername = sUsername;
64     }
65     
66     /**
67      * Returns the username for this set of authentication information.
68      *
69      * @return Username
70      */

71     public String JavaDoc getUsername() {
72         return this.m_sUsername;
73     }
74     
75     /**
76      * Adds a password to the authentication information.
77      *
78      * @param sPassword Password
79      */

80     public void setPassword(String JavaDoc sPassword) {
81         this.m_sPassword = sPassword;
82     }
83     
84     /**
85      * Returns the password for this set of authentication information.
86      *
87      * @return Password
88      */

89     public String JavaDoc getPassword() {
90         return this.m_sPassword;
91     }
92     
93 // /**
94
// * Sets the path to the virtual file for the principal representing
95
// * the user.
96
// *
97
// * @param sUserPath Full path
98
// */
99
// public void setUserPath(String sUserPath) {
100
// this.m_sUserPath = sUserPath;
101
// this.m_user = new HarmoniseUser(ServerList.getInstance().getHarmoniseServer().getVFS(), sUserPath);
102
// }
103

104     public void setUser(VFSUser user) {
105         this.m_user = user;
106     }
107     
108     /**
109      * Returns the user object
110      *
111      * @return User object
112      */

113     public VFSUser getUser() {
114         return this.m_user;
115     }
116     
117     /**
118      * Returns the full path to the virtual file for the principal
119      * representing the user.
120      *
121      * @return Full path
122      */

123     public String JavaDoc getUserPath() {
124         return this.m_sUserPath;
125     }
126
127 }
128
Popular Tags