Package org.apache.catalina.users
Class GenericRole<UD extends UserDatabase>
- java.lang.Object
-
- org.apache.catalina.users.AbstractRole
-
- org.apache.catalina.users.GenericRole<UD>
-
- Type Parameters:
UD
- The specific type of UserDase with which this role is associated
- All Implemented Interfaces:
java.security.Principal
,Role
- Direct Known Subclasses:
MemoryRole
public class GenericRole<UD extends UserDatabase> extends AbstractRole
Concrete implementation of
Role
for aUserDatabase
.- Author:
- Craig R. McClanahan
-
-
Field Summary
Fields Modifier and Type Field Description protected UserDatabase
database
TheUserDatabase
that owns this role.-
Fields inherited from class org.apache.catalina.users.AbstractRole
description, rolename
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
UserDatabase
getUserDatabase()
Return theUserDatabase
within which this role is defined.int
hashCode()
void
setDescription(java.lang.String description)
Set the description of this role.void
setRolename(java.lang.String rolename)
Set the role name of this role, which must be unique within the scope of aUserDatabase
.-
Methods inherited from class org.apache.catalina.users.AbstractRole
getDescription, getName, getRolename
-
-
-
-
Field Detail
-
database
protected final UserDatabase database
TheUserDatabase
that owns this role.
-
-
Method Detail
-
getUserDatabase
public UserDatabase getUserDatabase()
Return theUserDatabase
within which this role is defined.- Specified by:
getUserDatabase
in interfaceRole
- Specified by:
getUserDatabase
in classAbstractRole
- Returns:
- the
UserDatabase
within which this Role is defined.
-
setDescription
public void setDescription(java.lang.String description)
Description copied from class:AbstractRole
Set the description of this role.- Specified by:
setDescription
in interfaceRole
- Overrides:
setDescription
in classAbstractRole
- Parameters:
description
- The new description
-
setRolename
public void setRolename(java.lang.String rolename)
Description copied from class:AbstractRole
Set the role name of this role, which must be unique within the scope of aUserDatabase
.- Specified by:
setRolename
in interfaceRole
- Overrides:
setRolename
in classAbstractRole
- Parameters:
rolename
- The new role name
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacejava.security.Principal
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.security.Principal
- Overrides:
hashCode
in classjava.lang.Object
-
-