com.ibm.security.userregistry
Interface UserGroup

All Superinterfaces:
Group, Principal
All Known Implementing Classes:
RACF_Group

public interface UserGroup
extends Group

Extends java.security.acl.Group to return attributes of the group and to allow group membership to have qualifying attributes. UserGroup is intended to be a group of individual users. Implementing classes may chose to support or not support adding UserGroups as members of another UserGroup. If an implementation does not support adding a Group as a member of another Group and the addMember method is invoked with the input Principal being an implementation of java.security.acl.Group, an illegalArgumentException will be thrown.


Method Summary
 boolean addMember(Principal user)
          Adds specified member to the group.
 boolean addMember(Principal member, BasicAttributes attributes)
          Adds member to the group with specified membership attributes
 BasicAttributes getAttributes()
          Returns attributes for this group from security repository
 BasicAttributes getMembershipAttributes(Principal member)
          Returns membership attributes of specified member to this group from security repository
 String getName()
          Returns the name of this group.
 boolean isMember(Principal member)
          Returns true if the passed principal is a member of the group
 Enumeration members()
          Returns an enumeration of the members in the group.
 void modifyMembershipAttributes(Principal member, ModificationItem[] mods)
          Modify membership attributes of specified member of this group in security repository
 boolean removeMember(Principal member)
          Removes specified member from the group.
 
Methods inherited from interface java.security.Principal
equals, hashCode, toString
 

Method Detail

addMember

public boolean addMember(Principal user)
Adds specified member to the group.

Specified by:
addMember in interface Group
See Also:
Group.addMember(java.security.Principal)

addMember

public boolean addMember(Principal member,
                         BasicAttributes attributes)
                  throws SecAdminException
Adds member to the group with specified membership attributes

Parameters:
member - Prinipal to add to the group
attributes - attributes of this principal's membership in the group
Returns:
true if the member was successfully added, false if the principal was already a member
Throws:
SecAdminException

getAttributes

public BasicAttributes getAttributes()
                              throws SecAdminException
Returns attributes for this group from security repository

Throws:
SecAdminException

getMembershipAttributes

public BasicAttributes getMembershipAttributes(Principal member)
                                        throws SecAdminException
Returns membership attributes of specified member to this group from security repository

Parameters:
member - member to retrieve membership attributes for
Throws:
SecAdminException

getName

public String getName()
Returns the name of this group. Value returned by getName would equal the groupname used on SecAdmin.getGroup(groupname)

Specified by:
getName in interface Principal
See Also:
Principal.getName()

isMember

public boolean isMember(Principal member)
Returns true if the passed principal is a member of the group

Specified by:
isMember in interface Group
See Also:
Group.isMember(java.security.Principal)

members

public Enumeration members()
Returns an enumeration of the members in the group. Each element in the enumeration must support the Principal interface.

Specified by:
members in interface Group
See Also:
Group.isMember(java.security.Principal)

modifyMembershipAttributes

public void modifyMembershipAttributes(Principal member,
                                       ModificationItem[] mods)
                                throws SecAdminException
Modify membership attributes of specified member of this group in security repository

Parameters:
member - member to modify
Throws:
SecAdminException

removeMember

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

Specified by:
removeMember in interface Group
See Also:
Group.removeMember(java.security.Principal)