Package org.opends.server.extensions
Class SimpleStaticGroupMemberList
- java.lang.Object
-
- org.opends.server.types.MemberList
-
- org.opends.server.extensions.SimpleStaticGroupMemberList
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class SimpleStaticGroupMemberList extends MemberList
This class provides an implementation of theMemberListclass that may be used in conjunction when static groups when no additional criteria is to be used to select a subset of the group members.
-
-
Constructor Summary
Constructors Constructor Description SimpleStaticGroupMemberList(ServerContext serverContext, DN groupDN, Set<org.opends.server.extensions.StaticGroup.CompactDn> memberDNs)Creates a new simple static group member list with the provided set of member DNs.
-
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.booleanhasMoreMembers()Indicates whether the group contains any more members.DNnextMemberDN()Retrieves the DN of the next group member.EntrynextMemberEntry()Retrieves the entry for the next group member.
-
-
-
Constructor Detail
-
SimpleStaticGroupMemberList
public SimpleStaticGroupMemberList(ServerContext serverContext, DN groupDN, Set<org.opends.server.extensions.StaticGroup.CompactDn> memberDNs)
Creates a new simple static group member list with the provided set of member DNs.- Parameters:
serverContext- The server context.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.
-
-
Method Detail
-
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.
-
nextMemberDN
public DN nextMemberDN() throws MembershipException
Description copied from class:MemberListRetrieves the DN of the next group member.- Overrides:
nextMemberDNin classMemberList- Returns:
- The DN of the next group member, or
nullif 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
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
-
-