001: /*
002: * The contents of this file are subject to the
003: * Mozilla Public License Version 1.1 (the "License");
004: * you may not use this file except in compliance with the License.
005: * You may obtain a copy of the License at http://www.mozilla.org/MPL/
006: *
007: * Software distributed under the License is distributed on an "AS IS"
008: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
009: * See the License for the specific language governing rights and
010: * limitations under the License.
011: *
012: * The Initial Developer of the Original Code is Simulacra Media Ltd.
013: * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
014: *
015: * All Rights Reserved.
016: *
017: * Contributor(s):
018: */
019: package org.openharmonise.vfs.authentication;
020:
021: /**
022: * Class to wrap up authentication information.
023: *
024: * @author Matthew Large
025: * @version $Revision: 1.1 $
026: *
027: */
028: public class AuthInfo {
029:
030: /**
031: * Username
032: */
033: private String m_sUsername = null;
034:
035: /**
036: * Password
037: */
038: private String m_sPassword = null;
039:
040: /**
041: * Path to the virtual file for the principal representing this user.
042: */
043: private String m_sUserPath = null;
044:
045: /**
046: * User object
047: */
048: private VFSUser m_user = null;
049:
050: /**
051: *
052: */
053: public AuthInfo() {
054: super ();
055: }
056:
057: /**
058: * Adds a username to the authentication infromation.
059: *
060: * @param sUsername Username to add
061: */
062: public void setUsername(String sUsername) {
063: this .m_sUsername = sUsername;
064: }
065:
066: /**
067: * Returns the username for this set of authentication information.
068: *
069: * @return Username
070: */
071: public String getUsername() {
072: return this .m_sUsername;
073: }
074:
075: /**
076: * Adds a password to the authentication information.
077: *
078: * @param sPassword Password
079: */
080: public void setPassword(String sPassword) {
081: this .m_sPassword = sPassword;
082: }
083:
084: /**
085: * Returns the password for this set of authentication information.
086: *
087: * @return Password
088: */
089: public String getPassword() {
090: return this .m_sPassword;
091: }
092:
093: // /**
094: // * Sets the path to the virtual file for the principal representing
095: // * the user.
096: // *
097: // * @param sUserPath Full path
098: // */
099: // 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 getUserPath() {
124: return this.m_sUserPath;
125: }
126:
127: }
|