Package org.opends.server.extensions
Class DynamicGroupMemberList
- java.lang.Object
-
- org.opends.server.types.MemberList
-
- org.opends.server.extensions.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 Summary
Constructors Constructor Description DynamicGroupMemberList(DN groupDN, Set<LDAPURL> memberURLs)Creates a new dynamic group member list with the provided information.DynamicGroupMemberList(DN groupDN, Set<LDAPURL> memberURLs, DN baseDN, SearchScope scope, SearchFilter filter)Creates a new dynamic group member list with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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.DNgetDynamicGroupDN()Retrieves the DN of the dynamic group with which this dynamic group member list is associated.booleanhasMoreMembers()Indicates whether the group contains any more members.EntrynextMemberEntry()Retrieves the entry for the next group member.-
Methods inherited from class org.opends.server.types.MemberList
nextMemberDN
-
-
-
-
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:MemberListIndicates whether the group contains any more members.- Specified by:
hasMoreMembersin classMemberList- Returns:
trueif the group has at least one more member, orfalseif not.
-
nextMemberEntry
public Entry nextMemberEntry() throws MembershipException
Description copied from class:MemberListRetrieves the entry for the next group member.- Specified by:
nextMemberEntryin classMemberList- Returns:
- The entry for the next group member, or
nullif 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:MemberListIndicates 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 tohasMoreMembersreturnsfalse.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classMemberList
-
-