Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.login
Class GroupImpl

java.lang.Object
  extended by org.nuxeo.ecm.platform.login.GroupImpl
All Implemented Interfaces:
java.security.acl.Group, java.security.Principal

public class GroupImpl
extends java.lang.Object
implements java.security.acl.Group

This class implements a group of principals.

Author:
Satish Dharmaraj

Constructor Summary
GroupImpl(java.lang.String groupName)
          Constructs a Group object with no members.
 
Method Summary
 boolean addMember(java.security.Principal user)
          adds the specified member to the group.
 boolean equals(java.security.acl.Group other)
           
 boolean equals(java.lang.Object obj)
          This function returns true if the group passed matches the group represented in this interface.
 java.lang.String getName()
          return the name of the principal.
 int hashCode()
          return a hashcode for the principal.
 boolean isMember(java.security.Principal member)
          returns true if the passed principal is a member of the group.
 java.util.Enumeration<? extends java.security.Principal> members()
          returns the enumeration of the members in the group.
 boolean removeMember(java.security.Principal user)
          Removes the specified member from the group.
 java.lang.String toString()
          Prints a stringified version of the group.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GroupImpl

public GroupImpl(java.lang.String groupName)
Constructs a Group object with no members.

Parameters:
groupName - the name of the group
Method Detail

addMember

public boolean addMember(java.security.Principal user)
adds the specified member to the group.

Specified by:
addMember in interface java.security.acl.Group
Parameters:
user - The principal to add to the group.
Returns:
true if the member was added - false if the member could not be added.

removeMember

public boolean removeMember(java.security.Principal user)
Removes the specified member from the group.

Specified by:
removeMember in interface java.security.acl.Group
Parameters:
user - The principal to remove from the group.
true - if the principal was removed false if the principal was not a member

members

public java.util.Enumeration<? extends java.security.Principal> members()
returns the enumeration of the members in the group.

Specified by:
members in interface java.security.acl.Group

equals

public boolean equals(java.lang.Object obj)
This function returns true if the group passed matches the group represented in this interface.

Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object
Parameters:
obj - the group to compare this group to.

equals

public boolean equals(java.security.acl.Group other)

toString

public java.lang.String toString()
Prints a stringified version of the group.

Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
return a hashcode for the principal.

Specified by:
hashCode in interface java.security.Principal
Overrides:
hashCode in class java.lang.Object

isMember

public boolean isMember(java.security.Principal member)
returns true if the passed principal is a member of the group.

Specified by:
isMember in interface java.security.acl.Group
Parameters:
member - The principal whose membership must be checked for.
Returns:
true if the principal is a member of this group, false otherwise

getName

public java.lang.String getName()
return the name of the principal.

Specified by:
getName in interface java.security.Principal

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.