FileDocCategorySizeDatePackage
MemoryRole.javaAPI DocGlassfish v2 API4138Fri May 04 22:32:30 BST 2007org.apache.catalina.users

MemoryRole

public class MemoryRole extends AbstractRole

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

author
Craig R. McClanahan
version
$Revision: 1.3 $ $Date: 2007/05/05 05:32:29 $
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());