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