org.objectweb.jonas.security.realm.principals
Class Role

java.lang.Object
  extended by org.objectweb.jonas.security.realm.principals.Role
All Implemented Interfaces:
java.io.Serializable, RoleMBean

public class Role
extends java.lang.Object
implements java.io.Serializable, RoleMBean

This class define the Role class which define a role with its name and description.

Author:
Florent Benoit
See Also:
Serialized Form

Constructor Summary
Role()
          Constructor
Role(java.lang.String name)
          Constructor with a specific role name
 
Method Summary
 java.lang.String getDescription()
          Get the description of this role
 java.lang.String getName()
          Get the name of this role
 void setDescription(java.lang.String description)
          Set the description of this role
 void setName(java.lang.String name)
          Set the name of this role
 java.lang.String toString()
          Use the XML representation of this object
 java.lang.String toXML()
          String representation of the role
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Role

public Role()
Constructor


Role

public Role(java.lang.String name)
Constructor with a specific role name

Parameters:
name - the role name to use
Method Detail

setName

public void setName(java.lang.String name)
Set the name of this role

Parameters:
name - Name of the role

getName

public java.lang.String getName()
Get the name of this role

Specified by:
getName in interface RoleMBean
Returns:
the name of this role

setDescription

public void setDescription(java.lang.String description)
Set the description of this role

Specified by:
setDescription in interface RoleMBean
Parameters:
description - description of the role

getDescription

public java.lang.String getDescription()
Get the description of this role

Specified by:
getDescription in interface RoleMBean
Returns:
the description of this role

toXML

public java.lang.String toXML()
String representation of the role

Returns:
the xml representation of the role

toString

public java.lang.String toString()
Use the XML representation of this object

Overrides:
toString in class java.lang.Object
Returns:
the XML representation of this object