Package org.apache.catalina.users
Class AbstractRole
- java.lang.Object
-
- org.apache.catalina.users.AbstractRole
-
- All Implemented Interfaces:
java.security.Principal
,Role
- Direct Known Subclasses:
GenericRole
public abstract class AbstractRole extends java.lang.Object implements Role
Convenience base class for
Role
implementations.- Since:
- 4.1
- Author:
- Craig R. McClanahan
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
description
The description of this Role.protected java.lang.String
rolename
The role name of this Role.
-
Constructor Summary
Constructors Constructor Description AbstractRole()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
Return the description of this role.java.lang.String
getName()
Make the principal name the same as the role name.java.lang.String
getRolename()
Return the role name of this role, which must be unique within the scope of aUserDatabase
.abstract UserDatabase
getUserDatabase()
Return theUserDatabase
within which this Role is defined.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
.
-
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Return the description of this role.- Specified by:
getDescription
in interfaceRole
- Returns:
- the description of this role.
-
setDescription
public void setDescription(java.lang.String description)
Set the description of this role.- Specified by:
setDescription
in interfaceRole
- Parameters:
description
- The new description
-
getRolename
public java.lang.String getRolename()
Return the role name of this role, which must be unique within the scope of aUserDatabase
.- Specified by:
getRolename
in interfaceRole
- Returns:
- the role name of this role, which must be unique
within the scope of a
UserDatabase
.
-
setRolename
public void setRolename(java.lang.String rolename)
Set the role name of this role, which must be unique within the scope of aUserDatabase
.- Specified by:
setRolename
in interfaceRole
- Parameters:
rolename
- The new role name
-
getUserDatabase
public abstract UserDatabase getUserDatabase()
Return theUserDatabase
within which this Role is defined.- Specified by:
getUserDatabase
in interfaceRole
- Returns:
- the
UserDatabase
within which this Role is defined.
-
getName
public java.lang.String getName()
Make the principal name the same as the role name.- Specified by:
getName
in interfacejava.security.Principal
-
-