FileDocCategorySizeDatePackage
AbstractUser.javaAPI DocGlassfish v2 API6255Fri May 04 22:32:30 BST 2007org.apache.catalina.users

AbstractUser

public abstract class AbstractUser extends Object implements org.apache.catalina.User

Convenience base class for {@link User} implementations.

author
Craig R. McClanahan
version
$Revision: 1.3 $ $Date: 2007/05/05 05:32:29 $
since
4.1

Fields Summary
protected String
fullName
The full name of this user.
protected String
password
The logon password of this user.
protected String
username
The logon username of this user.
Constructors Summary
Methods Summary
public abstract voidaddGroup(org.apache.catalina.Group group)
Add a new {@link Group} to those this user belongs to.

param
group The new group

public abstract voidaddRole(org.apache.catalina.Role role)
Add a new {@link Role} to those assigned specifically to this user.

param
role The new role

public java.lang.StringgetFullName()
Return the full name of this user.



    // ------------------------------------------------------------- Properties


                
       

        return (this.fullName);

    
public abstract java.util.IteratorgetGroups()
Return the set of {@link Group}s to which this user belongs.

public java.lang.StringgetName()
Make the principal name the same as the group name.


        return (getUsername());

    
public java.lang.StringgetPassword()
Return the logon password of this user, optionally prefixed with the identifier of an encoding scheme surrounded by curly braces, such as {md5}xxxxx.


        return (this.password);

    
public abstract java.util.IteratorgetRoles()
Return the set of {@link Role}s assigned specifically to this user.

public java.lang.StringgetUsername()
Return the logon username of this user, which must be unique within the scope of a {@link UserDatabase}.


        return (this.username);

    
public abstract booleanisInGroup(org.apache.catalina.Group group)
Is this user in the specified {@link Group}?

param
group The group to check

public abstract booleanisInRole(org.apache.catalina.Role role)
Is this user specifically assigned the specified {@link Role}? This method does NOT check for roles inherited based on {@link Group} membership.

param
role The role to check

public abstract voidremoveGroup(org.apache.catalina.Group group)
Remove a {@link Group} from those this user belongs to.

param
group The old group

public abstract voidremoveGroups()
Remove all {@link Group}s from those this user belongs to.

public abstract voidremoveRole(org.apache.catalina.Role role)
Remove a {@link Role} from those assigned to this user.

param
role The old role

public abstract voidremoveRoles()
Remove all {@link Role}s from those assigned to this user.

public voidsetFullName(java.lang.String fullName)
Set the full name of this user.

param
fullName The new full name


        this.fullName = fullName;

    
public voidsetPassword(java.lang.String password)
Set the logon password of this user, optionally prefixed with the identifier of an encoding scheme surrounded by curly braces, such as {md5}xxxxx.

param
password The new logon password


        this.password = password;

    
public voidsetUsername(java.lang.String username)
Set the logon username of this user, which must be unique within the scope of a {@link UserDatabase}.

param
username The new logon username


        this.username = username;