Top Description Fields Constructors Methods
org.apache.catalina.users

public abstract Class AbstractUser

extends Object
implements User
Class Inheritance
All Implemented Interfaces
org.apache.catalina.User, java.security.Principal
Known Direct Subclasses
org.apache.catalina.users.GenericUser
Imports
java.util.Iterator, org.apache.catalina.Group, .Role, .User

Convenience base class for User implementations.

Author
Craig R. McClanahan
Since
4.1

Field Summary

Modifier and TypeField and Description
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.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract void
addGroup(Group
The new group
group
)

Redeclares org.apache.catalina.User.addGroup.

Add a new Group to those this user belongs to.

public abstract void
addRole(Role
The new role
role
)

Redeclares org.apache.catalina.User.addRole.

Add a new Role to those assigned specifically to this user.

public String
getFullName()

Implements org.apache.catalina.User.getFullName.

Return the full name of this user.

public abstract Iterator<Group>
getGroups()

Redeclares org.apache.catalina.User.getGroups.

Return the set of Groups to which this user belongs.

public String
getName()

Implements java.security.Principal.getName.

Make the principal name the same as the group name.

public String
getPassword()

Implements org.apache.catalina.User.getPassword.

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

public abstract Iterator<Role>
getRoles()

Redeclares org.apache.catalina.User.getRoles.

Return the set of Roles assigned specifically to this user.

public String
getUsername()

Implements org.apache.catalina.User.getUsername.

Return the logon username of this user, which must be unique within the scope of a org.apache.catalina.UserDatabase.

public abstract boolean
isInGroup(Group
The group to check
group
)

Redeclares org.apache.catalina.User.isInGroup.

Is this user in the specified Group?

public abstract boolean
isInRole(Role
The role to check
role
)

Redeclares org.apache.catalina.User.isInRole.

Is this user specifically assigned the specified Role?

public abstract void
removeGroup(Group
The old group
group
)

Redeclares org.apache.catalina.User.removeGroup.

Remove a Group from those this user belongs to.

public abstract void
removeGroups()

Redeclares org.apache.catalina.User.removeGroups.

Remove all Groups from those this user belongs to.

public abstract void
removeRole(Role
The old role
role
)

Redeclares org.apache.catalina.User.removeRole.

Remove a Role from those assigned to this user.

public abstract void
removeRoles()

Redeclares org.apache.catalina.User.removeRoles.

Remove all Roles from those assigned to this user.

public void
setFullName(String
The new full name
fullName
)

Implements org.apache.catalina.User.setFullName.

Set the full name of this user.

public void
setPassword(String
The new logon password
password
)

Implements org.apache.catalina.User.setPassword.

Set the logon password of this user, optionally prefixed with the identifier of an encoding scheme surrounded by curly braces, such as {md5}xxxxx.

public void
setUsername(String
The new logon username
username
)

Implements org.apache.catalina.User.setUsername.

Set the logon username of this user, which must be unique within the scope of a org.apache.catalina.UserDatabase.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fullNameback to summary
protected String fullName

The full name of this user.

passwordback to summary
protected String password

The logon password of this user.

usernameback to summary
protected String username

The logon username of this user.

Constructor Detail

AbstractUserback to summary
public AbstractUser()

Method Detail

addGroupback to summary
public abstract void addGroup(Group group)

Redeclares org.apache.catalina.User.addGroup.

Add a new Group to those this user belongs to.

Parameters
group:Group

The new group

Annotations
@Override
addRoleback to summary
public abstract void addRole(Role role)

Redeclares org.apache.catalina.User.addRole.

Add a new Role to those assigned specifically to this user.

Parameters
role:Role

The new role

Annotations
@Override
getFullNameback to summary
public String getFullName()

Implements org.apache.catalina.User.getFullName.

Return the full name of this user.

Returns:String

Doc from org.apache.catalina.User.getFullName.

the full name of this user.

Annotations
@Override
getGroupsback to summary
public abstract Iterator<Group> getGroups()

Redeclares org.apache.catalina.User.getGroups.

Return the set of Groups to which this user belongs.

Returns:Iterator<Group>

Doc from org.apache.catalina.User.getGroups.

the set of Groups to which this user belongs.

Annotations
@Override
getNameback to summary
public String getName()

Implements java.security.Principal.getName.

Make the principal name the same as the group name.

Returns:String

Doc from java.security.Principal.getName.

the name of this Principal.

Annotations
@Override
getPasswordback to summary
public String getPassword()

Implements org.apache.catalina.User.getPassword.

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

Returns:String

Doc from org.apache.catalina.User.getPassword.

the logon password of this user, optionally prefixed with the identifier of an encoding scheme surrounded by curly braces, such as {md5}xxxxx.

Annotations
@Override
getRolesback to summary
public abstract Iterator<Role> getRoles()

Redeclares org.apache.catalina.User.getRoles.

Return the set of Roles assigned specifically to this user.

Returns:Iterator<Role>

Doc from org.apache.catalina.User.getRoles.

the set of Roles assigned specifically to this user.

Annotations
@Override
getUsernameback to summary
public String getUsername()

Implements org.apache.catalina.User.getUsername.

Return the logon username of this user, which must be unique within the scope of a org.apache.catalina.UserDatabase.

Returns:String

Doc from org.apache.catalina.User.getUsername.

the logon username of this user, which must be unique within the scope of a UserDatabase.

Annotations
@Override
isInGroupback to summary
public abstract boolean isInGroup(Group group)

Redeclares org.apache.catalina.User.isInGroup.

Is this user in the specified Group?

Parameters
group:Group

The group to check

Returns:boolean

Doc from org.apache.catalina.User.isInGroup.

true if the user is in the specified group

Annotations
@Override
isInRoleback to summary
public abstract boolean isInRole(Role role)

Redeclares org.apache.catalina.User.isInRole.

Is this user specifically assigned the specified Role? This method does NOT check for roles inherited based on Group membership.

Parameters
role:Role

The role to check

Returns:boolean

Doc from org.apache.catalina.User.isInRole.

true if the user has the specified role

Annotations
@Override
removeGroupback to summary
public abstract void removeGroup(Group group)

Redeclares org.apache.catalina.User.removeGroup.

Remove a Group from those this user belongs to.

Parameters
group:Group

The old group

Annotations
@Override
removeGroupsback to summary
public abstract void removeGroups()

Redeclares org.apache.catalina.User.removeGroups.

Remove all Groups from those this user belongs to.

Annotations
@Override
removeRoleback to summary
public abstract void removeRole(Role role)

Redeclares org.apache.catalina.User.removeRole.

Remove a Role from those assigned to this user.

Parameters
role:Role

The old role

Annotations
@Override
removeRolesback to summary
public abstract void removeRoles()

Redeclares org.apache.catalina.User.removeRoles.

Remove all Roles from those assigned to this user.

Annotations
@Override
setFullNameback to summary
public void setFullName(String fullName)

Implements org.apache.catalina.User.setFullName.

Set the full name of this user.

Parameters
fullName:String

The new full name

Annotations
@Override
setPasswordback to summary
public void setPassword(String password)

Implements org.apache.catalina.User.setPassword.

Set the logon password of this user, optionally prefixed with the identifier of an encoding scheme surrounded by curly braces, such as {md5}xxxxx.

Parameters
password:String

The new logon password

Annotations
@Override
setUsernameback to summary
public void setUsername(String username)

Implements org.apache.catalina.User.setUsername.

Set the logon username of this user, which must be unique within the scope of a org.apache.catalina.UserDatabase.

Parameters
username:String

The new logon username

Annotations
@Override