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

public Class GenericRole<UD extends UserDatabase>

extends AbstractRole
Class Inheritance
Known Direct Subclasses
org.apache.catalina.users.MemoryRole
Type Parameters
<UD>
The specific type of UserDase with which this role is associated
Imports
org.apache.catalina.UserDatabase

Concrete implementation of org.apache.catalina.Role for a UserDatabase.

Author
Craig R. McClanahan

Field Summary

Modifier and TypeField and Description
protected final UserDatabase
database

The UserDatabase that owns this role.

Inherited from org.apache.catalina.users.AbstractRole:
descriptionrolename

Constructor Summary

AccessConstructor and Description
pack-priv
GenericRole(UD
The UserDatabase that owns this role
database
,
String
Role name of this role
rolename
,
String
Description of this role
description
)

Package-private constructor used by the factory method in UserDatabase.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
Principal to compare with.
obj
)

Overrides java.lang.Object.equals.

Implements java.security.Principal.equals.

Compares this Principal to the specified object.

public UserDatabase
getUserDatabase()

Implements abstract org.apache.catalina.users.AbstractRole.getUserDatabase.

Implements org.apache.catalina.Role.getUserDatabase.

Return the UserDatabase within which this role is defined.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements java.security.Principal.hashCode.

Returns a hashcode for this Principal.

public void
setDescription(String
The new description
description
)

Overrides org.apache.catalina.users.AbstractRole.setDescription.

Implements org.apache.catalina.Role.setDescription.

Set the description of this role.

public void
setRolename(String
The new role name
rolename
)

Overrides org.apache.catalina.users.AbstractRole.setRolename.

Implements org.apache.catalina.Role.setRolename.

Set the role name of this role, which must be unique within the scope of a UserDatabase.

Inherited from org.apache.catalina.users.AbstractRole:
getDescriptiongetNamegetRolename

Field Detail

databaseback to summary
protected final UserDatabase database

The UserDatabase that owns this role.

Constructor Detail

GenericRoleback to summary
pack-priv GenericRole(UD database, String rolename, String description)

Package-private constructor used by the factory method in UserDatabase.

Parameters
database:UD

The UserDatabase that owns this role

rolename:String

Role name of this role

description:String

Description of this role

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Implements java.security.Principal.equals.

Doc from java.security.Principal.equals.

Compares this Principal to the specified object. Returns true if the object passed in matches the Principal represented by the implementation of this interface.

Parameters
obj:Object

Principal to compare with.

Returns:boolean

true if the Principal passed in is the same as that encapsulated by this Principal, and false otherwise.

Annotations
@Override
getUserDatabaseback to summary
public UserDatabase getUserDatabase()

Implements abstract org.apache.catalina.users.AbstractRole.getUserDatabase.

Implements org.apache.catalina.Role.getUserDatabase.

Return the UserDatabase within which this role is defined.

Returns:UserDatabase

Doc from org.apache.catalina.Role.getUserDatabase.

the UserDatabase within which this Role is defined.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements java.security.Principal.hashCode.

Doc from java.security.Principal.hashCode.

Returns a hashcode for this Principal.

Returns:int

a hashcode for this Principal

Annotations
@Override
setDescriptionback to summary
public void setDescription(String description)

Overrides org.apache.catalina.users.AbstractRole.setDescription.

Implements org.apache.catalina.Role.setDescription.

Doc from org.apache.catalina.users.AbstractRole.setDescription.

Set the description of this role.

Parameters
description:String

The new description

Annotations
@Override
setRolenameback to summary
public void setRolename(String rolename)

Overrides org.apache.catalina.users.AbstractRole.setRolename.

Implements org.apache.catalina.Role.setRolename.

Doc from org.apache.catalina.users.AbstractRole.setRolename.

Set the role name of this role, which must be unique within the scope of a UserDatabase.

Parameters
rolename:String

The new role name

Annotations
@Override