org.apache.catalina.users

Class AbstractRole

Implemented Interfaces:
Principal, Role
Known Direct Subclasses:
MemoryRole

public abstract class AbstractRole
extends java.lang.Object
implements Role

Convenience base class for Role implementations.

Version:
$Revision: 1.3 $ $Date: 2004/02/27 14:58:50 $

Author:
Craig R. McClanahan

Since:
4.1

Field Summary

protected String
description
The description of this Role.
protected String
rolename
The role name of this Role.

Method Summary

String
getDescription()
Return the description of this role.
String
getName()
Make the principal name the same as the role name.
String
getRolename()
Return the role name of this role, which must be unique within the scope of a UserDatabase.
UserDatabase
getUserDatabase()
Return the UserDatabase within which this Role is defined.
void
setDescription(String description)
Set the description of this role.
void
setRolename(String rolename)
Set the role name of this role, which must be unique within the scope of a UserDatabase.

Field Details

description

protected String description
The description of this Role.


rolename

protected String rolename
The role name of this Role.

Method Details

getDescription

public String getDescription()
Return the description of this role.
Specified by:
getDescription in interface Role


getName

public String getName()
Make the principal name the same as the role name.


getRolename

public String getRolename()
Specified by:
getRolename in interface Role


getUserDatabase

public UserDatabase getUserDatabase()
Return the UserDatabase within which this Role is defined.
Specified by:
getUserDatabase in interface Role


setDescription

public void setDescription(String description)
Set the description of this role.
Specified by:
setDescription in interface Role

Parameters:
description - The new description


setRolename

public void setRolename(String rolename)
Specified by:
setRolename in interface Role

Parameters:
rolename - The new role name


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.