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

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

public class Group
extends java.lang.Object
implements java.io.Serializable, GroupMBean

This class define the Group class which represent a group with its associated roles

Author:
Florent Benoit
See Also:
Serialized Form

Field Summary
protected static java.lang.String SEPARATOR
          Separator of the roles
 
Constructor Summary
Group()
          Default Constructor
Group(java.lang.String name)
          Constructor with a given name
 
Method Summary
 void addRole(java.lang.String role)
          Add a role to this group
 java.lang.String[] getArrayRoles()
          Get the roles
 java.lang.String getDescription()
          Get the description of this group
 java.lang.String getName()
          Get the name of this user
 java.lang.String getRoles()
          Get the roles
 void removeRole(java.lang.String role)
          Remove a role from this group
 void setDescription(java.lang.String description)
          Set the description of this group
 void setName(java.lang.String name)
          Set the name of this user
 void setRoles(java.lang.String roles)
          Set the roles of the group
 java.lang.String toString()
          Use the XML representation of this object
 java.lang.String toXML()
          String representation of the group
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SEPARATOR

protected static final java.lang.String SEPARATOR
Separator of the roles

See Also:
Constant Field Values
Constructor Detail

Group

public Group()
Default Constructor


Group

public Group(java.lang.String name)
Constructor with a given name

Parameters:
name - the name of this group
Method Detail

setName

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

Parameters:
name - Name of the user

getName

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

Specified by:
getName in interface GroupMBean
Returns:
the name of this user

setDescription

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

Specified by:
setDescription in interface GroupMBean
Parameters:
description - description of the group

getDescription

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

Specified by:
getDescription in interface GroupMBean
Returns:
the description of this group

setRoles

public void setRoles(java.lang.String roles)
Set the roles of the group

Parameters:
roles - the list of the roles of the group

addRole

public void addRole(java.lang.String role)
Add a role to this group

Specified by:
addRole in interface GroupMBean
Parameters:
role - the given role

removeRole

public void removeRole(java.lang.String role)
Remove a role from this group

Specified by:
removeRole in interface GroupMBean
Parameters:
role - the given role

getRoles

public java.lang.String getRoles()
Get the roles

Returns:
the array of the roles

getArrayRoles

public java.lang.String[] getArrayRoles()
Get the roles

Specified by:
getArrayRoles in interface GroupMBean
Returns:
the array of the roles

toXML

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

Returns:
the xml representation of the group

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