Copyright (c) 2001, Junzo SATO. All rights reserved.
Aug 17th 2001
J/Link Mathmatica package is loaded.
![[Graphics:Images/mathldap03_gr_1.gif]](Images/mathldap03_gr_1.gif)
InstallJava[ ] setups J/Link environment so that the Mathmatica can use Java. Options of InstallJava[ ] varies depending on which machine and operating system a user is using.
![[Graphics:Images/mathldap03_gr_2.gif]](Images/mathldap03_gr_2.gif)
![[Graphics:Images/mathldap03_gr_3.gif]](Images/mathldap03_gr_3.gif)
![[Graphics:Images/mathldap03_gr_5.gif]](Images/mathldap03_gr_5.gif)
Tools are loaded and defined.
![[Graphics:Images/mathldap03_gr_16.gif]](Images/mathldap03_gr_16.gif)
![[Graphics:Images/mathldap03_gr_18.gif]](Images/mathldap03_gr_18.gif)
![[Graphics:Images/mathldap03_gr_19.gif]](Images/mathldap03_gr_19.gif)
![[Graphics:Images/mathldap03_gr_20.gif]](Images/mathldap03_gr_20.gif)
The above result is the same as the one that LDAP Editor/Browser has retrieved.
Null password for authentication means anonymous connection.
![[Graphics:Images/mathldap03_gr_29.gif]](Images/mathldap03_gr_29.gif)
![[Graphics:Images/mathldap03_gr_37.gif]](Images/mathldap03_gr_37.gif)
![[Graphics:Images/mathldap03_gr_39.gif]](Images/mathldap03_gr_39.gif)
![[Graphics:Images/mathldap03_gr_41.gif]](Images/mathldap03_gr_41.gif)
![[Graphics:Images/mathldap03_gr_43.gif]](Images/mathldap03_gr_43.gif)
![[Graphics:Images/mathldap03_gr_89.gif]](Images/mathldap03_gr_89.gif)
![[Graphics:Images/mathldap03_gr_91.gif]](Images/mathldap03_gr_91.gif)
![[Graphics:Images/mathldap03_gr_137.gif]](Images/mathldap03_gr_137.gif)
![[Graphics:Images/mathldap03_gr_138.gif]](Images/mathldap03_gr_138.gif)
The NEW entry is added successfully. For simplicity, new entry is added under the ou=Special Users directory.
AddAttribute[conn,dn,attrname,data] adds an attribute to the existing entry. If the data is exactly same value as the existing attribute, it fails.
![[Graphics:Images/mathldap03_gr_140.gif]](Images/mathldap03_gr_140.gif)
![[Graphics:Images/mathldap03_gr_141.gif]](Images/mathldap03_gr_141.gif)
New attribute (multivalued attribute) is added successfully.
![[Graphics:Images/mathldap03_gr_143.gif]](Images/mathldap03_gr_143.gif)
![[Graphics:Images/mathldap03_gr_144.gif]](Images/mathldap03_gr_144.gif)
Attribute(s) named "mail" is replaced with new data.
It's possible to replace attribute(s) with multivalues.
![[Graphics:Images/mathldap03_gr_146.gif]](Images/mathldap03_gr_146.gif)
The following figure shows the entry after replacement.
![[Graphics:Images/mathldap03_gr_148.gif]](Images/mathldap03_gr_148.gif)
![[Graphics:Images/mathldap03_gr_149.gif]](Images/mathldap03_gr_149.gif)
Surely removed :-)
![[Graphics:Images/mathldap03_gr_151.gif]](Images/mathldap03_gr_151.gif)
![[Graphics:Images/mathldap03_gr_152.gif]](Images/mathldap03_gr_152.gif)
Two mails are listed as the result of first modification. The telephoneNumber is removed by replacing old attribute with null. One more mail is added by the final modification.
The attribute of the entry can maintain binary record directly.
![[Graphics:Images/mathldap03_gr_154.gif]](Images/mathldap03_gr_154.gif)
![[Graphics:Images/mathldap03_gr_155.gif]](Images/mathldap03_gr_155.gif)
![[Graphics:Images/mathldap03_gr_157.gif]](Images/mathldap03_gr_157.gif)
![[Graphics:Images/mathldap03_gr_159.gif]](Images/mathldap03_gr_159.gif)
![[Graphics:Images/mathldap03_gr_161.gif]](Images/mathldap03_gr_161.gif)
![[Graphics:Images/mathldap03_gr_163.gif]](Images/mathldap03_gr_163.gif)
The data is stored to the entry.
![[Graphics:Images/mathldap03_gr_164.gif]](Images/mathldap03_gr_164.gif)
Now we can see the replaced data. Look at the size of the binary data.
![[Graphics:Images/mathldap03_gr_166.gif]](Images/mathldap03_gr_166.gif)
The contents of the data is exactly same before and after the operation.
![[Graphics:Images/mathldap03_gr_168.gif]](Images/mathldap03_gr_168.gif)
Connection to the LDAP server is closed.This is essentially the same as ldapconn@finalize[].
![[Graphics:Images/mathldap03_gr_170.gif]](Images/mathldap03_gr_170.gif)
![[Graphics:Images/mathldap03_gr_171.gif]](Images/mathldap03_gr_171.gif)
![[Graphics:Images/mathldap03_gr_173.gif]](Images/mathldap03_gr_173.gif)
[1] Rob Weltman and Tony Dahbura, "LDAP Programming with Java", Addison-Wesley, 2000