Save This Page
Home » apache-tomcat-6.0.26-src » org.apache » catalina » users » [javadoc | source]
org.apache.catalina.users
public class: MemoryUser [javadoc | source]
java.lang.Object
   org.apache.catalina.users.AbstractUser
      org.apache.catalina.users.MemoryUser

All Implemented Interfaces:
    User

Concrete implementation of org.apache.catalina.User for the MemoryUserDatabase implementation of UserDatabase .

Field Summary
protected  MemoryUserDatabase database    The MemoryUserDatabase that owns this user. 
protected  ArrayList groups    The set of Group s that this user is a member of. 
protected  ArrayList roles    The set of Role s associated with this user. 
Fields inherited from org.apache.catalina.users.AbstractUser:
fullName,  password,  username
Constructor:
 MemoryUser(MemoryUserDatabase database,
    String username,
    String password,
    String fullName) 
    Parameters:
    database - The MemoryUserDatabase that owns this user
    username - Logon username of the new user
    password - Logon password of the new user
    fullName - Full name of the new user
Method from org.apache.catalina.users.MemoryUser Summary:
addGroup,   addRole,   getGroups,   getRoles,   getUserDatabase,   isInGroup,   isInRole,   removeGroup,   removeGroups,   removeRole,   removeRoles,   toString
Methods from org.apache.catalina.users.AbstractUser:
addGroup,   addRole,   getFullName,   getGroups,   getName,   getPassword,   getRoles,   getUsername,   isInGroup,   isInRole,   removeGroup,   removeGroups,   removeRole,   removeRoles,   setFullName,   setPassword,   setUsername
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.users.MemoryUser Detail:
 public  void addGroup(Group group) 
    Add a new Group to those this user belongs to.
 public  void addRole(Role role) 
    Add a new Role to those assigned specifically to this user.
 public Iterator getGroups() 
    Return the set of Group s to which this user belongs.
 public Iterator getRoles() 
    Return the set of Role s assigned specifically to this user.
 public UserDatabase getUserDatabase() 
 public boolean isInGroup(Group group) 
    Is this user in the specified group?
 public boolean isInRole(Role role) 
    Is this user specifically assigned the specified Role ? This method does NOT check for roles inherited based on Group membership.
 public  void removeGroup(Group group) 
    Remove a Group from those this user belongs to.
 public  void removeGroups() 
    Remove all Group s from those this user belongs to.
 public  void removeRole(Role role) 
    Remove a Role from those assigned to this user.
 public  void removeRoles() 
    Remove all Role s from those assigned to this user.
 public String toString() 

    Return a String representation of this user in XML format.

    IMPLEMENTATION NOTE - For backwards compatibility, the reader that processes this entry will accept either username or name for the username property.