|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.api.Group<DynamicGroupImplementationCfg>
org.opends.server.extensions.DynamicGroup
public class DynamicGroup
This class provides a dynamic group implementation, in which membership is determined dynamically based on criteria provided in the form of one or more LDAP URLs. All dynamic groups should contain the groupOfURLs object class, with the memberURL attribute specifying the membership criteria.
Constructor Summary | |
---|---|
DynamicGroup()
Creates a new, uninitialized dynamic group instance. |
|
DynamicGroup(DN groupEntryDN,
java.util.LinkedHashSet<LDAPURL> memberURLs)
Creates a new dynamic group instance with the provided information. |
Method Summary | |
---|---|
void |
addMember(Entry userEntry)
Attempts to add the provided user as a member of this group. |
void |
addNestedGroup(DN nestedGroupDN)
Attempts to add the provided group DN as a nested group within this group. |
SearchFilter |
getGroupDefinitionFilter()
Retrieves a search filter that may be used to identify entries containing definitions for groups of this type in the Directory Server. |
DN |
getGroupDN()
Retrieves the DN of the entry that contains the definition for this group. |
MemberList |
getMembers()
Retrieves an iterator that may be used to cursor through the entries of the members contained in this group. |
MemberList |
getMembers(DN baseDN,
SearchScope scope,
SearchFilter filter)
Retrieves an iterator that may be used to cursor through the entries of the members contained in this group. |
java.util.Set<LDAPURL> |
getMemberURLs()
Retrieves the set of member URLs for this dynamic group. |
java.util.List<DN> |
getNestedGroupDNs()
Retrieves a list of the DNs of any nested groups whose members should be considered members of this group. |
void |
initializeGroupImplementation(DynamicGroupImplementationCfg configuration)
Initializes a "shell" instance of this group implementation that may be used to identify and instantiate instances of this type of group in the directory data. |
boolean |
isGroupDefinition(Entry entry)
Indicates whether the provided entry contains a valid definition for this type of group. |
boolean |
isMember(DN userDN,
java.util.Set<DN> examinedGroups)
Indicates whether the user with the specified DN is a member of this group. |
boolean |
isMember(Entry userEntry,
java.util.Set<DN> examinedGroups)
Indicates whether the user described by the provided user entry is a member of this group. |
boolean |
mayAlterMemberList()
Indicates whether it is possible to alter the member list for this group (e.g., in order to add members to the group or remove members from it). |
DynamicGroup |
newInstance(Entry groupEntry)
Creates a new group of this type based on the definition contained in the provided entry. |
void |
removeMember(DN userDN)
Attempts to remove the specified user as a member of this group. |
void |
removeNestedGroup(DN nestedGroupDN)
Attempts to remove the provided group as a nested group within this group. |
boolean |
supportsNestedGroups()
Indicates whether this group supports nesting other groups, such that the members of the nested groups will also be considered members of this group. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this group to the provided buffer. |
Methods inherited from class org.opends.server.api.Group |
---|
finalizeGroupImplementation, isConfigurationAcceptable, isMember, isMember, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DynamicGroup()
public DynamicGroup(DN groupEntryDN, java.util.LinkedHashSet<LDAPURL> memberURLs)
groupEntryDN
- The DN of the entry that holds the definition for
this group. It must not be null
.memberURLs
- The set of LDAP URLs that define the membership
criteria for this group. It must not be
null
.Method Detail |
---|
public void initializeGroupImplementation(DynamicGroupImplementationCfg configuration) throws ConfigException, InitializationException
initializeGroupImplementation
in class Group<DynamicGroupImplementationCfg>
configuration
- The configuration for this group
implementation.
ConfigException
- If there is a problem with the provided
configuration entry.
InitializationException
- If a problem occurs while
attempting to initialize this
group implementation that is
not related to the server
configuration.public DynamicGroup newInstance(Entry groupEntry) throws DirectoryException
initializeGroupImplementation
method.
newInstance
in class Group<DynamicGroupImplementationCfg>
groupEntry
- The entry containing the definition for the
group to be created.
DirectoryException
- If a problem occurs while trying to
create the group instance.public SearchFilter getGroupDefinitionFilter() throws DirectoryException
initializeGroupImplementation
method.
getGroupDefinitionFilter
in class Group<DynamicGroupImplementationCfg>
DirectoryException
- If a problem occurs while trying to
locate all of the applicable group
definition entries.public boolean isGroupDefinition(Entry entry)
isGroupDefinition
in class Group<DynamicGroupImplementationCfg>
entry
- The entry for which to make the determination.
true
if the provided entry does contain a valid
definition for this type of group, or false
if
it does not.public DN getGroupDN()
getGroupDN
in class Group<DynamicGroupImplementationCfg>
public java.util.Set<LDAPURL> getMemberURLs()
public boolean supportsNestedGroups()
supportsNestedGroups
in class Group<DynamicGroupImplementationCfg>
true
if this group supports nesting other
groups, or false
if it does not.public java.util.List<DN> getNestedGroupDNs()
getNestedGroupDNs
in class Group<DynamicGroupImplementationCfg>
public void addNestedGroup(DN nestedGroupDN) throws java.lang.UnsupportedOperationException, DirectoryException
addNestedGroup
in class Group<DynamicGroupImplementationCfg>
nestedGroupDN
- The DN of the group that should be added
to the set of nested groups for this
group.
java.lang.UnsupportedOperationException
- If this group does not
support nesting.
DirectoryException
- If a problem occurs while attempting
to nest the provided group DN.public void removeNestedGroup(DN nestedGroupDN) throws java.lang.UnsupportedOperationException, DirectoryException
removeNestedGroup
in class Group<DynamicGroupImplementationCfg>
nestedGroupDN
- The DN of the group that should be removed
from the set of nested groups for this
group.
java.lang.UnsupportedOperationException
- If this group does not
support nesting.
DirectoryException
- If a problem occurs while attempting
to nest the provided group DN.public boolean isMember(DN userDN, java.util.Set<DN> examinedGroups) throws DirectoryException
isMember
in class Group<DynamicGroupImplementationCfg>
userDN
- The DN of the user for which to make the
determination.examinedGroups
- A set of groups that have already been
examined in the process of making the
determination. This provides a mechanism
to prevent infinite recursion due to
circular references (e.g., two groups
include each other as nested groups).
Each time a group instance is checked,
its DN should be added to the list, and
any DN already contained in the list
should be skipped.
true
if the specified user is currently a member
of this group, or false
if not.
DirectoryException
- If a problem occurs while attempting
to make the determination.public boolean isMember(Entry userEntry, java.util.Set<DN> examinedGroups) throws DirectoryException
isMember
in class Group<DynamicGroupImplementationCfg>
userEntry
- The entry for the user for which to make
the determination.examinedGroups
- A set of groups that have already been
examined in the process of making the
determination. This provides a mechanism
to prevent infinite recursion due to
circular references (e.g., two groups
include each other as nested groups).
Each time a group instance is checked,
its DN should be added to the list, and
any DN already contained in the list
should be skipped.
true
if the specified user is currently a member
of this group, or false
if not.
DirectoryException
- If a problem occurs while attempting
to make the determination.public MemberList getMembers() throws DirectoryException
getMembers
in class Group<DynamicGroupImplementationCfg>
DirectoryException
- If a problem occurs while attempting
to retrieve the set of members.public MemberList getMembers(DN baseDN, SearchScope scope, SearchFilter filter) throws DirectoryException
getMembers
in class Group<DynamicGroupImplementationCfg>
baseDN
- The base DN that should be used when determining
whether a given entry will be returned. If this
is null
, then all entries will be
considered in the scope of the criteria.scope
- The scope that should be used when determining
whether a given entry will be returned. It must
not be null
if the provided base DN is
not null
. The scope will be ignored if
no base DN is provided.filter
- The filter that should be used when determining
whether a given entry will be returned. If this
is null
, then any entry in the scope of
the criteria will be included in the results.
DirectoryException
- If a problem occurs while attempting
to retrieve the set of members.public boolean mayAlterMemberList()
mayAlterMemberList
in class Group<DynamicGroupImplementationCfg>
true
if it is possible to add members to this
group, or false
if not.public void addMember(Entry userEntry) throws java.lang.UnsupportedOperationException, DirectoryException
addMember
in class Group<DynamicGroupImplementationCfg>
userEntry
- The entry for the user to be added as a member
of this group.
java.lang.UnsupportedOperationException
- If this group does not
support altering the
member list.
DirectoryException
- If a problem occurs while attempting
to add the provided user as a member
of this group.public void removeMember(DN userDN) throws java.lang.UnsupportedOperationException, DirectoryException
removeMember
in class Group<DynamicGroupImplementationCfg>
userDN
- The DN of the user to remove as a member of this
group.
java.lang.UnsupportedOperationException
- If this group does not
support altering the
member list.
DirectoryException
- If a problem occurs while attempting
to remove the provided user as a
member of this group.public void toString(java.lang.StringBuilder buffer)
toString
in class Group<DynamicGroupImplementationCfg>
buffer
- The buffer to which the string representation
should be appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |