You can add new entries to the directory by defining a DN for the entry, creating the attributes for the entry, and requesting that the LDAP server add the new entry.
Creating an entry in the directory requires the following steps:
Instantiate an LDAPAttribute object for each attribute that forms the entry.
Instantiate an LDAPAttributeSet object and use the add method to add each LDAPAttribute object from step 1.
Instantiate an LDAPEntry object that specifies the new DN and the LDAPAttributeSet from step 2.
Call the LDAPConnection.add method with the LDAPEntry object from step 3.
The LDAPAttribute class represents an attribute. An LDAPAttribute is used to build each attribute ...