All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface org.webmacro.resource.User

public interface User
Represents a web user. You do not normally create user objects directly, instead you get them from a UserDB. A user is a place to store objects related to a particular user, so it has a dictionary like API.


Method Index

 o authenticate(String)
Check whether the supplied authorization key authenticates this user or not.
 o elements()
Get an enumeration of the elements stored in this User
 o get(String)
Get an object stored in this user's storage area
 o getName()
Get the name of this user.
 o isEmpty()
Are there any object stored in the user?
 o put(String, Object)
Store an object in the user's storage area
 o remove(String)
Remove an object from the user's storage area
 o setPassword(String)
Set this users password to the submitted string.
 o size()
How many objects are stored in the user?
 o toString()
Return a string representation of this user suitable for debugging

Methods

 o setPassword
 public abstract void setPassword(String password)
Set this users password to the submitted string. Setting a users password to null prevents them from being authenticated.

 o getName
 public abstract String getName()
Get the name of this user. When the UserDB (or ResourceBroker) requests a user, this is the string that is used to retrieve the correct User object. It should be a short identifying string, although there is no inherent length limitation.

 o authenticate
 public abstract boolean authenticate(String authKey)
Check whether the supplied authorization key authenticates this user or not. In the current implementation it checks whether a digest of the authKey matches a digest of the authKey originally used to create the user.

 o elements
 public abstract Enumeration elements()
Get an enumeration of the elements stored in this User

 o get
 public abstract Object get(String key)
Get an object stored in this user's storage area

 o put
 public abstract Object put(String key,
                            Object value)
Store an object in the user's storage area

 o remove
 public abstract Object remove(String key)
Remove an object from the user's storage area

 o size
 public abstract int size()
How many objects are stored in the user?

 o isEmpty
 public abstract boolean isEmpty()
Are there any object stored in the user?

 o toString
 public abstract String toString()
Return a string representation of this user suitable for debugging

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index