Class DynamicGroupMemberList

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class DynamicGroupMemberList
    extends MemberList
    This class defines a mechanism that may be used to iterate over the members of a dynamic group, optionally using an additional set of criteria to further filter the results.
    • Constructor Detail

      • DynamicGroupMemberList

        public DynamicGroupMemberList​(DN groupDN,
                                      Set<LDAPURL> memberURLs)
                               throws DirectoryException
        Creates a new dynamic group member list with the provided information.
        Parameters:
        groupDN - The DN of the entry containing the group definition.
        memberURLs - The set of LDAP URLs that define the membership criteria for the associated group.
        Throws:
        DirectoryException - If a problem occurs while creating the member list.
      • DynamicGroupMemberList

        public DynamicGroupMemberList​(DN groupDN,
                                      Set<LDAPURL> memberURLs,
                                      DN baseDN,
                                      SearchScope scope,
                                      SearchFilter filter)
                               throws DirectoryException
        Creates a new dynamic group member list with the provided information.
        Parameters:
        groupDN - The DN of the entry containing the group definition.
        memberURLs - The set of LDAP URLs that define the membership criteria for the associated group.
        baseDN - The base DN that should be enforced for all entries to return.
        scope - The scope that should be enforced for all entries to return.
        filter - The filter that should be enforced for all entries to return.
        Throws:
        DirectoryException - If a problem occurs while creating the member list.
    • Method Detail

      • getDynamicGroupDN

        public final DN getDynamicGroupDN()
        Retrieves the DN of the dynamic group with which this dynamic group member list is associated.
        Returns:
        The DN of the dynamic group with which this dynamic group member list is associated.
      • hasMoreMembers

        public boolean hasMoreMembers()
        Description copied from class: MemberList
        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.
      • nextMemberEntry

        public Entry nextMemberEntry()
                              throws MembershipException
        Description copied from class: MemberList
        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()
        Description copied from class: MemberList
        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 interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in class MemberList