vqServer API Class vq.server.User

java.lang.Object
    |
    +----vq.utils.klentry
            |
            +----vq.server.User
Contents
Package index
Package
API index

public class User
extends klentry
Represents a vqServer user. Also contains static methods which provide functionality similar to the vq.server.UserXXX servlets. Warning: the key field is used to store a unique identifier and should not be modified.


Constructor Index

 o User()
Creates a new user.

Method Index

 o getAccesses()
Returns the number of times the user has made an authenticated request since the user was created.
 o getAddress()
Returns the user's postal address.
 o getCreationTime()
Returns the time (as returned by System.currentTimeMillis()) the user was created.
 o getEmail()
Returns the user's email address.
 o getID()
Returns the user's ID.
 o getLastAccessTime()
Returns the time (as returned by System.currentTimeMillis()) the user last made an authenticated request.
 o getName()
Returns the user's name.
 o getNote()
Returns the user's note field.
 o getPwd()
Returns the user's password.
 o getPwdChangedTime()
Returns the time (as returned by System.currentTimeMillis()) the user's password was last changed.
 o kill()
Kills the user (metaphorically).
 o login(String, String, HttpServletResponse)
Checks the user ID and password specified against the vqServer user database.
 o login(String, String, String, HttpServletResponse)
Checks the user ID and password specified against the vqServer user database and access control lists.
 o logout(HttpServletResponse)
Removes any vqServer authentication cookie from the user's session, thus logging the user out.
 o save(vqos)
Writes the user to the specified output stream in vqServer .cfg file format.
 o setAddress(String)
Sets the user's postal address.
 o setEmail(String)
Sets the user's email address.
 o setID(String)
Sets the user's ID.
 o setName(String)
Sets the user's name.
 o setNote(String)
Sets the user's note field.
 o setPwd(String)
Sets the user's password.

Constructor Detail

 o User
public User()
          Creates a new user.

Method Detail

 o kill
public void kill()
          Kills the user (metaphorically). Warning: do not invoke this method if the user is a member of a list.
Overrides:
kill in class klentry
 o save
public void save(vqos os) throws java.io.IOException
          Writes the user to the specified output stream in vqServer .cfg file format.
Overrides:
save in class klentry
 o getID
public java.lang.String getID()
          Returns the user's ID.
 o setID
public void setID(java.lang.String theID)
          Sets the user's ID. After using this method, call Users.remove() and Users.add(User) to maintain the ordering of entries in Users.
 o getName
public java.lang.String getName()
          Returns the user's name.
 o setName
public void setName(java.lang.String theName)
          Sets the user's name.
 o getPwd
public java.lang.String getPwd()
          Returns the user's password.
 o setPwd
public void setPwd(java.lang.String thePwd)
          Sets the user's password.
 o getEmail
public java.lang.String getEmail()
          Returns the user's email address.
 o setEmail
public void setEmail(java.lang.String theEmail)
          Sets the user's email address.
 o getAddress
public java.lang.String getAddress()
          Returns the user's postal address.
 o setAddress
public void setAddress(java.lang.String theAddress)
          Sets the user's postal address.
 o getNote
public java.lang.String getNote()
          Returns the user's note field.
 o setNote
public void setNote(java.lang.String theNote)
          Sets the user's note field.
 o getAccesses
public int getAccesses()
          Returns the number of times the user has made an authenticated request since the user was created.
 o getCreationTime
public long getCreationTime()
          Returns the time (as returned by System.currentTimeMillis()) the user was created.
 o getLastAccessTime
public long getLastAccessTime()
          Returns the time (as returned by System.currentTimeMillis()) the user last made an authenticated request.
 o getPwdChangedTime
public long getPwdChangedTime()
          Returns the time (as returned by System.currentTimeMillis()) the user's password was last changed.
 o login
public static boolean login(java.lang.String userID,
                            java.lang.String pwd,
                            javax.servlet.http.HttpServletResponse rep)
          Checks the user ID and password specified against the vqServer user database. Returns true if the ID and password are valid and adds a vqServer authentication cookie to the response so that the users doesn't have to keep filling in a password dialog. The response parameter can be null.
 o login
public boolean login(java.lang.String userID,
                     java.lang.String pwd,
                     java.lang.String aclKey,
                     javax.servlet.http.HttpServletResponse rep)
          Checks the user ID and password specified against the vqServer user database and access control lists. Returns true if the ID and password are valid AND the user belongs to the specified access control list and adds a vqServer authentication cookie to the response so that the users doesn't have to keep filling in a password dialog. The response parameter can be null.
 o logout
public void logout(javax.servlet.http.HttpServletResponse rep)
          Removes any vqServer authentication cookie from the user's session, thus logging the user out.


vqServer API version 1.9. vqServer and the vqServer API are copyright © Steve Shering and vqSoft 1997-2000. Last updated 15 May 2000.

Contents
Package index
Package
API index