O'Reilly logo

LDAP Programming with Java™ by Tony Dahbura, Rob Weltman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding an Entry

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.

Summary of Steps to Add a New Entry

Creating an entry in the directory requires the following steps:

1.
Instantiate an LDAPAttribute object for each attribute that forms the entry.
2.
Instantiate an LDAPAttributeSet object and use the add method to add each LDAPAttribute object from step 1.
3.
Instantiate an LDAPEntry object that specifies the new DN and the LDAPAttributeSet from step 2.
4.
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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required