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:
- MemoryRole
 
 public abstract class AbstractRole extends java.lang.Object implements Role Convenience base class for Roleimplementations.- Since:
- 4.1
- Author:
- Craig R. McClanahan
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringdescriptionThe description of this Role.protected java.lang.StringrolenameThe role name of this Role.
 - 
Constructor SummaryConstructors Constructor Description AbstractRole()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()Return the description of this role.java.lang.StringgetName()Make the principal name the same as the role name.java.lang.StringgetRolename()Return the role name of this role, which must be unique within the scope of aUserDatabase.abstract UserDatabasegetUserDatabase()Return theUserDatabasewithin which this Role is defined.voidsetDescription(java.lang.String description)Set the description of this role.voidsetRolename(java.lang.String rolename)Set the role name of this role, which must be unique within the scope of aUserDatabase.
 
- 
- 
- 
Method Detail- 
getDescriptionpublic java.lang.String getDescription() Return the description of this role.- Specified by:
- getDescriptionin interface- Role
- Returns:
- the description of this role.
 
 - 
setDescriptionpublic void setDescription(java.lang.String description) Set the description of this role.- Specified by:
- setDescriptionin interface- Role
- Parameters:
- description- The new description
 
 - 
getRolenamepublic java.lang.String getRolename() Return the role name of this role, which must be unique within the scope of aUserDatabase.- Specified by:
- getRolenamein interface- Role
- Returns:
- the role name of this role, which must be unique
 within the scope of a UserDatabase.
 
 - 
setRolenamepublic void setRolename(java.lang.String rolename) Set the role name of this role, which must be unique within the scope of aUserDatabase.- Specified by:
- setRolenamein interface- Role
- Parameters:
- rolename- The new role name
 
 - 
getUserDatabasepublic abstract UserDatabase getUserDatabase() Return theUserDatabasewithin which this Role is defined.- Specified by:
- getUserDatabasein interface- Role
- Returns:
- the UserDatabasewithin which this Role is defined.
 
 - 
getNamepublic java.lang.String getName() Make the principal name the same as the role name.- Specified by:
- getNamein interface- java.security.Principal
 
 
- 
 
-