| java.lang.Object org.ow2.easybeans.security.struct.JGroup
JGroup | public class JGroup implements Group,Serializable(Code) | | This class represents all the roles of a principal (group of principals).
These roles are added to the Subject
author: Florent Benoit |
Constructor Summary | |
public | JGroup(String groupName) Build a new group with the following name. |
Method Summary | |
public boolean | addMember(Principal user) Adds the specified member to the group.
Parameters: user - the principal to add to this group. | public boolean | equals(Object another) Compares this principal to the specified object. | public String | getName() Returns the name of this principal. | public int | hashCode() Returns a hashcode for this principal. | public boolean | isMember(Principal member) Returns true if the passed principal is a member of the group. | public Enumeration<? extends Principal> | members() Returns an enumeration of the members in the group. | public boolean | removeMember(Principal user) Removes the specified member from the group.
Parameters: user - the principal to remove from this group. | public String | toString() Returns a string representation of this principal. |
JGroup | public JGroup(String groupName)(Code) | | Build a new group with the following name.
Parameters: groupName - name of the group |
addMember | public boolean addMember(Principal user)(Code) | | Adds the specified member to the group.
Parameters: user - the principal to add to this group. true if the member was successfully added, false if the principalwas already a member. |
equals | public boolean equals(Object another)(Code) | | 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. true if the principal passed in is the same as that encapsulatedby this principal, and false otherwise. |
getName | public String getName()(Code) | | Returns the name of this principal.
the name of this principal. |
hashCode | public int hashCode()(Code) | | Returns a hashcode for this principal.
a hashcode for this principal. |
isMember | public boolean isMember(Principal member)(Code) | | 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. true if the principal is a member of this group, false otherwise. |
members | public Enumeration<? extends Principal> members()(Code) | | 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).
an enumeration of the group members. |
removeMember | public boolean removeMember(Principal user)(Code) | | Removes the specified member from the group.
Parameters: user - the principal to remove from this group. true if the principal was removed, or false if the principal wasnot a member. |
toString | public String toString()(Code) | | Returns a string representation of this principal.
a string representation of this principal. |
|
|