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
Roleimplementations.- Since:
- 4.1
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringdescriptionThe description of this Role.protected java.lang.StringrolenameThe role name of this Role.
-
Constructor Summary
Constructors Constructor Description AbstractRole()Constructs a new AbstractRole.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()Gets the description of this role.java.lang.StringgetName()Make the principal name the same as the role name.java.lang.StringgetRolename()Gets the role name of this role, which must be unique within the scope of aUserDatabase.voidsetDescription(java.lang.String description)Sets the description of this role.voidsetRolename(java.lang.String rolename)Sets the role name of this role, which must be unique within the scope of aUserDatabase.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.catalina.Role
getUserDatabase
-
-
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Description copied from interface:RoleGets the description of this role.- Specified by:
getDescriptionin interfaceRole- Returns:
- The description of this role
-
setDescription
public void setDescription(java.lang.String description)
Description copied from interface:RoleSets the description of this role.- Specified by:
setDescriptionin interfaceRole- Parameters:
description- The new description
-
getRolename
public java.lang.String getRolename()
Description copied from interface:RoleGets the role name of this role, which must be unique within the scope of aUserDatabase.- Specified by:
getRolenamein interfaceRole- Returns:
- The role name
-
setRolename
public void setRolename(java.lang.String rolename)
Description copied from interface:RoleSets the role name of this role, which must be unique within the scope of aUserDatabase.- Specified by:
setRolenamein interfaceRole- Parameters:
rolename- The new role name
-
getName
public java.lang.String getName()
Make the principal name the same as the role name.- Specified by:
getNamein interfacejava.security.Principal
-
-