org.ow2.jonas.security.internal.realm.principal
Class Group

java.lang.Object
  extended by org.ow2.jonas.security.internal.realm.principal.Group
All Implemented Interfaces:
Serializable, GroupMBean

public class Group
extends Object
implements 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 String SEPARATOR
          Separator of the roles
 
Constructor Summary
Group()
          Default Constructor
Group(String name)
          Constructor with a given name
 
Method Summary
 void addRole(String role)
          Add a role to this group
 String[] getArrayRoles()
          Get the roles
 String getDescription()
          Get the description of this group
 String getName()
          Get the name of this user
 String getRoles()
          Get the roles
 void removeRole(String role)
          Remove a role from this group
 void setDescription(String description)
          Set the description of this group
 void setName(String name)
          Set the name of this user
 void setRoles(String roles)
          Set the roles of the group
 String toString()
          Use the XML representation of this object
 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 String SEPARATOR
Separator of the roles

See Also:
Constant Field Values
Constructor Detail

Group

public Group()
Default Constructor


Group

public Group(String name)
Constructor with a given name

Parameters:
name - the name of this group
Method Detail

setName

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

Parameters:
name - Name of the user

getName

public String getName()
Get the name of this user

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

setDescription

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

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

getDescription

public String getDescription()
Get the description of this group

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

setRoles

public void setRoles(String roles)
Set the roles of the group

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

addRole

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

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

removeRole

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

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

getRoles

public String getRoles()
Get the roles

Returns:
the array of the roles

getArrayRoles

public String[] getArrayRoles()
Get the roles

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

toXML

public String toXML()
String representation of the group

Returns:
the xml representation of the group

toString

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

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


Copyright © 2010 OW2 Consortium. All Rights Reserved.