Package org.forgerock.opendj.examples
Class UpdateGroupAsync
java.lang.Object
org.forgerock.opendj.examples.UpdateGroupAsync
This command-line client demonstrates adding and removing a member from a
(potentially large) static group using the asynchronous APIs.
The client takes as arguments the host and port of the directory server, the
group DN, the member DN, and whether to "add" or "del" the specified member
from the group. The client uses the Permissive Modify control if it is
available to avoid having to check whether the member belongs to the group or
not.
This client expects a group that is a
groupOfNames such as:
dn: cn=My Static Group,ou=Groups,dc=example,dc=com cn: My Static Group objectClass: groupOfNames objectClass: top ou: Groups member: uid=ahunter,ou=People,dc=example,dc=com member: uid=bjensen,ou=People,dc=example,dc=com member: uid=tmorris,ou=People,dc=example,dc=comThis client connects as
cn=Directory Manager with password
password. Not a best practice; in real code use application
specific credentials to connect, and ensure that your application has access
to use the Permissive Modify control if your directory server supports it.-
Method Summary
-
Method Details
-
main
Updates the group as necessary.- Parameters:
args- The command line arguments: host, port, group-dn, member-dn, (add|del)
-