FileDocCategorySizeDatePackage
MemoryRole.javaAPI DocApache Tomcat 6.0.142944Fri Jul 20 04:20:32 BST 2007org.apache.catalina.users

MemoryRole

public class MemoryRole extends AbstractRole

Concrete implementation of {@link org.apache.catalina.Role} for the {@link MemoryUserDatabase} implementation of {@link UserDatabase}.

author
Craig R. McClanahan
version
$Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
since
4.1

Fields Summary
protected MemoryUserDatabase
database
The {@link MemoryUserDatabase} that owns this role.
Constructors Summary
MemoryRole(MemoryUserDatabase database, String rolename, String description)
Package-private constructor used by the factory method in {@link MemoryUserDatabase}.

param
database The {@link MemoryUserDatabase} that owns this role
param
rolename Role name of this role
param
description Description of this role


        super();
        this.database = database;
        setRolename(rolename);
        setDescription(description);

    
Methods Summary
public org.apache.catalina.UserDatabasegetUserDatabase()
Return the {@link UserDatabase} within which this role is defined.



    // ------------------------------------------------------------- Properties


                   
       

        return (this.database);

    
public java.lang.StringtoString()

Return a String representation of this role in XML format.


        StringBuffer sb = new StringBuffer("<role rolename=\"");
        sb.append(rolename);
        sb.append("\"");
        if (description != null) {
            sb.append(" description=\"");
            sb.append(description);
            sb.append("\"");
        }
        sb.append("/>");
        return (sb.toString());