Interface Group

    • Method Detail

      • getDN

        DN getDN()
        Retrieves the DN of the entry that defines this group.
        Returns:
        The DN of the entry that defines this group.
      • isMember

        boolean isMember​(java.lang.String userDN,
                         boolean directMembershipOnly)
                  throws LDAPException
        Indicates whether the specified user is a member of this group.
        Parameters:
        userDN - The DN for the user for whom to make the determination. It must not be null.
        directMembershipOnly - Indicates whether to only consider the user a member of the group if that user is directly named as a member of the group. If this parameter is true, then the method will return true only if the user is directly listed as a member of the group, and will not included dynamic or nested membership. If this parameter is false, then the method will return true if the user is a direct member of the group, is a member of a dynamic group in which the user matches the membership criteria, or if the user is a member of a nested group.
        Returns:
        true if the specified user is a member of this group, or false if not.
        Throws:
        LDAPException - If a problem is encountered while attempting to make the determination.
      • isMember

        boolean isMember​(Entry userEntry,
                         boolean directMembershipOnly)
                  throws LDAPException
        Indicates whether the specified user is a member of this group.
        Parameters:
        userEntry - The entry for the user for whom to make the determination. It must not be null.
        directMembershipOnly - Indicates whether to only consider the user a member of the group if that user is directly named as a member of the group. If this parameter is true, then the method will return true only if the user is directly listed as a member of the group, and will not included dynamic or nested membership. If this parameter is false, then the method will return true if the user is a direct member of the group, is a member of a dynamic group in which the user matches the membership criteria, or if the user is a member of a nested group.
        Returns:
        true if the specified user is a member of this group, or false if not.
        Throws:
        LDAPException - If a problem is encountered while attempting to make the determination.
      • getMemberIterator

        GroupMemberIterator getMemberIterator​(java.lang.String baseDN,
                                              SearchScope scope,
                                              Filter filter,
                                              boolean includeNestedMembers)
                                       throws LDAPException
        Retrieves an object that may be used to iterate through the members of this group. It may be used to iterate through all members, or only members that match a specified set of criteria.
        Parameters:
        baseDN - A base DN that may be used to restrict the set of members that are made available through the iterator. If this is non-null, then the iterator will only iterate across entries at or below this base DN that are also within the specified scope.
        scope - A search scope that may be used to restrict the set of members that are made available through the iterator. If the base DN is non-null, then the scope must also be non-null, and the iterator will only iterate across entries at or below the base DN and within this scope.
        filter - A filter that may be used to restrict the set of members that are made available through the iterator. If this is non-null, then the iterator will only iterate across members that match this filter.
        includeNestedMembers - Indicates whether to include members that are not direct members of this group, but that are nested members because they are members of a group that is directly or indirectly a member of this group.
        Returns:
        A GroupMemberIterator object that may be used to iterate across the members of this group.
        Throws:
        LDAPException - If a problem is encountered while creating the requested group member iterator.