org.objectweb.jonas.security.auth.JGroup Class Reference

List of all members.

Public Member Functions

 JGroup (String name)
boolean equals (Object another)
String toString ()
int hashCode ()
String getName ()
boolean addMember (Principal user)
boolean removeMember (Principal user)
boolean isMember (Principal member)
Enumeration members ()

Detailed Description

This class represents all the roles of a principal (group of principals). These roles are added to the Subject
Author:
Florent Benoit

Definition at line 40 of file JGroup.java.


Constructor & Destructor Documentation

org.objectweb.jonas.security.auth.JGroup.JGroup String  name  ) 
 

Build a new group with the following name

Parameters:
name name of the group

Definition at line 58 of file JGroup.java.


Member Function Documentation

boolean org.objectweb.jonas.security.auth.JGroup.addMember Principal  user  ) 
 

Adds the specified member to the group.

Parameters:
user the principal to add to this group.
Returns:
true if the member was successfully added, false if the principal was already a member.

Definition at line 107 of file JGroup.java.

References org.objectweb.jonas.security.auth.JGroup.isMember().

Referenced by org.objectweb.jonas.security.auth.spi.JResourceLoginModule.commit().

Here is the call graph for this function:

boolean org.objectweb.jonas.security.auth.JGroup.equals Object  another  ) 
 

Compares this principal to the specified object. Returns true if the object passed in matches the principal represented by the implementation of this interface.

Parameters:
another principal to compare with.
Returns:
true if the principal passed in is the same as that encapsulated by this principal, and false otherwise.

Definition at line 69 of file JGroup.java.

References org.objectweb.jonas.security.auth.JGroup.getName().

Here is the call graph for this function:

String org.objectweb.jonas.security.auth.JGroup.getName  ) 
 

Returns the name of this principal.

Returns:
the name of this principal.

Definition at line 98 of file JGroup.java.

Referenced by org.objectweb.jonas.security.auth.JGroup.equals().

int org.objectweb.jonas.security.auth.JGroup.hashCode  ) 
 

Returns a hashcode for this principal.

Returns:
a hashcode for this principal.

Definition at line 90 of file JGroup.java.

boolean org.objectweb.jonas.security.auth.JGroup.isMember Principal  member  ) 
 

Returns true if the passed principal is a member of the group. This method does a recursive search, so if a principal belongs to a group which is a member of this group, true is returned.

Parameters:
member the principal whose membership is to be checked.
Returns:
true if the principal is a member of this group, false otherwise.

Definition at line 136 of file JGroup.java.

Referenced by org.objectweb.jonas.security.auth.JGroup.addMember(), and org.objectweb.jonas.security.auth.JGroup.removeMember().

Enumeration org.objectweb.jonas.security.auth.JGroup.members  ) 
 

Returns an enumeration of the members in the group. The returned objects can be instances of either Principal or Group (which is a subclass of Principal).

Returns:
an enumeration of the group members.

Definition at line 145 of file JGroup.java.

boolean org.objectweb.jonas.security.auth.JGroup.removeMember Principal  user  ) 
 

Removes the specified member from the group.

Parameters:
user the principal to remove from this group.
Returns:
true if the principal was removed, or false if the principal was not a member.

Definition at line 121 of file JGroup.java.

References org.objectweb.jonas.security.auth.JGroup.isMember().

Here is the call graph for this function:

String org.objectweb.jonas.security.auth.JGroup.toString  ) 
 

Returns a string representation of this principal.

Returns:
a string representation of this principal.

Definition at line 81 of file JGroup.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:07:39 2005 for JOnAS by  doxygen 1.3.9.1