org.opends.server.extensions
Class FilteredStaticGroupMemberList

java.lang.Object
  extended by org.opends.server.types.MemberList
      extended by org.opends.server.extensions.FilteredStaticGroupMemberList

public class FilteredStaticGroupMemberList
extends MemberList

This class provides an implementation of the MemberList class that may be used in conjunction when static groups when additional criteria is to be used to select a subset of the group members.


Constructor Summary
FilteredStaticGroupMemberList(DN groupDN, java.util.Set<DN> memberDNs, DN baseDN, SearchScope scope, SearchFilter filter)
          Creates a new filtered static group member list with the provided information.
 
Method Summary
 void close()
          Indicates that this member list is no longer required and that the server may clean up any resources that may have been used in the course of processing.
 boolean hasMoreMembers()
          Indicates whether the group contains any more members.
 DN nextMemberDN()
          Retrieves the DN of the next group member.
 Entry nextMemberEntry()
          Retrieves the entry for the next group member.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredStaticGroupMemberList

public FilteredStaticGroupMemberList(DN groupDN,
                                     java.util.Set<DN> memberDNs,
                                     DN baseDN,
                                     SearchScope scope,
                                     SearchFilter filter)
Creates a new filtered static group member list with the provided information.

Parameters:
groupDN - The DN of the static group with which this member list is associated.
memberDNs - The set of DNs for the users that are members of the associated static group.
baseDN - The base DN below which all returned members should exist. If this is null, then all members will be considered to match the base and scope criteria.
scope - The search scope to apply against the base DN when selecting eligible members.
filter - The search filter which all returned members should match. If this is null, then all members will be considered eligible.
Method Detail

hasMoreMembers

public boolean hasMoreMembers()
Indicates whether the group contains any more members.

Specified by:
hasMoreMembers in class MemberList
Returns:
true if the group has at least one more member, or false if not.

nextMemberDN

public DN nextMemberDN()
                throws MembershipException
Retrieves the DN of the next group member.

Overrides:
nextMemberDN in class MemberList
Returns:
The DN of the next group member, or null if there are no more members.
Throws:
MembershipException - If a problem occurs while attempting to retrieve the next member DN.

nextMemberEntry

public Entry nextMemberEntry()
                      throws MembershipException
Retrieves the entry for the next group member.

Specified by:
nextMemberEntry in class MemberList
Returns:
The entry for the next group member, or null if there are no more members.
Throws:
MembershipException - If a problem occurs while attempting to retrieve the next entry.

close

public void close()
Indicates that this member list is no longer required and that the server may clean up any resources that may have been used in the course of processing. This method must be called if the caller wishes to stop iterating across the member list before the end has been reached, although it will not be necessary if the call to hasMoreMembers returns false.

Specified by:
close in class MemberList