Complete Contents
Preface
Chapter 1 Understanding LDAP
Chapter 2 Using the Netscape Directory SDK for Java
Chapter 3 Quick Start
Chapter 4 Writing an LDAP Client
Chapter 5 Using the LDAP Java Classes
Chapter 6 Searching the Directory
Chapter 7 Using Filter Configuration Files
Chapter 8 Adding, Updating, and Deleting Entries
Chapter 9 Comparing Values in Entries
Chapter 10 Working with LDAP URLs
Chapter 11 Getting Server Information
Chapter 12 Connecting Over SSL
Chapter 13 Working with LDAP Controls
Chapter 14 Using SASL Authentication
Chapter 15 Using Netscape's JNDI Service Provider
Chapter 16 Working with Extended Operations
Chapter 17 Using the Asynchronous Interface
Glossary
Directory SDK for Java 4.0 Programmer's Guide
Contents Index


Netscape Directory SDK 4.0 for Java Programmer's Guide
  
The Netscape Directory SDK 4.0 for Java Programmer's Guide documents the Netscape Directory SDK for Java, a development kit for writing LDAP (Lightweight Directory Access Protocol) applications.


Contents
Who Should Read This Guide
Where to Find LDAP Information
What's New in This Release
What's in This Guide
Where to Find Reference Information
Documentation Conventions
About the Sample Code
 
Part 1 Introduction to LDAP and the Netscape Directory SDK for Java

 
Chapter 1 Understanding LDAP
How Directory Services Work
How LDAP Servers Organize Directories
How LDAP Clients and Servers Work
Understanding the LDAP v3 Protocol
For More Information
 
Chapter 2 Using the Netscape Directory SDK for Java
Understanding the LDAP Java Classes
Getting Started with the Netscape Directory SDK for Java
Getting and Installing the SDK
Exploring the SDK
Preparing to Use the SDK
Writing Applets with the SDK
Checking the Version of Classes from an Applet
Working with the LDAP JavaBeans
Using the Classes in JavaScript
 
Chapter 3 Quick Start
Understanding the Sample Client
Sample Code
 
Part 2 Writing Clients with the Netscape Directory SDK for Java

 
Chapter 4 Writing an LDAP Client
Overview: Designing an LDAP Client
Creating a Connection and Setting Preferences
Connecting to the LDAP Server
Binding and Authenticating to an LDAP Server
Understanding Authentication Methods
     Simple Authentication

     Certificate-Based Client Authentication (over SSL)

     Simple Authentication and Security Layer (SASL)

Using Simple Authentication
Binding Anonymously
Specifying the LDAP Version
Authenticating with the connect Method
Performing LDAP Operations
Closing the Connection to the Server
 
Chapter 5 Using the LDAP Java Classes
Getting Information About the SDK
Handling Exceptions
Getting Information About the Error
Getting the Error Message
Handling Referrals
Understanding Referrals
Enabling or Disabling Referral Handling
Limiting Referral Hops
Binding When Following Referrals
Using an In-Memory Cache
How the Cache Operates
Setting Up an In-Memory Cache
Caching Requests by Base DN
Sharing a Cache Between Connections
Flushing the Cache
Getting Cache Statistics
Cloning a Connection
Manipulating Distinguished Names
Getting the Components of a Distinguished Name
 
Chapter 6 Searching the Directory
Overview: Searching with the LDAP Java Classes
Sending a Search Request
Specifying the Base DN and Scope
Specifying a Search Filter
Specifying the Attributes to Retrieve
Setting Search Preferences
     Setting Preferences for All Searches

     Overriding Preferences on Individual Searches

     Configuring the Search to Wait for All Results

     Setting Size and Time Limits

Example of Sending a Search Request
Getting the Search Results
Getting Entries from the Results
Getting Distinguished Names from the Results
Getting Attributes from an Entry
Getting the Name and Values of an Attribute
Sorting the Search Results
Abandoning a Search
Example: Searching the Directory
Reading an Entry
Listing Subentries
 
Chapter 7 Using Filter Configuration Files
Understanding Filter Configuration Files
Understanding the Configuration File Syntax
Understanding Filter Parameters
Loading a Filter Configuration File
Retrieving Filters
Adding Filter Prefixes and Suffixes
Adding Affixes for All Filters
Adding Affixes By Using setFilterAffixes
Adding Affixes By Using getFilter
Adding Affixes By Using setupFilter
 
Chapter 8 Adding, Updating, and Deleting Entries
Adding a New Entry
Creating a New Attribute
Creating a New Attribute Set
Creating a New Entry
Adding the Entry to the Directory
Example of Adding an Entry
Modifying an Entry
Specifying the Changes
     Adding New Values to an Attribute

     Removing Values to an Attribute

     Replacing the Values of an Attribute

     Adding a New Attribute

     Removing an Attribute

Modifying the Entry in the Directory
Example of Modifying an Entry
Deleting an Entry
Example of Deleting an Entry
Changing the Name of an Entry
Removing the Attribute for the Old RDN
Example of Renaming an Entry
 
Chapter 9 Comparing Values in Entries
Comparing the Value of an Attribute
Specifying the Attribute and Value
Performing the Comparison
Example of Comparing a Value Against an Attribute
 
Chapter 10 Working with LDAP URLs
Understanding LDAP URLs
Examples of LDAP URLs
Getting the Components of an LDAP URL
Processing an LDAP URL
 
Part 3 Advanced Topics

 
Chapter 11 Getting Server Information
Understanding DSEs
Getting the Root DSE
Determining If the Server Supports LDAP v3
Getting Schema Information
Overview: Schema Over LDAP
Getting the Schema for an LDAP Server
Working with Object Class Descriptions
Working with Attribute Type Descriptions
Working with Matching Rule Descriptions
Example of Working with the Schema
 
Chapter 12 Connecting Over SSL
How SSL Works with the Netscape Directory SDK for Java
Understanding SSL
SSL Over LDAP
Interfaces and Classes for SSL
Prerequisites for Connecting Over SSL
Connecting to the Server Over SSL
Using Certificate-Based Client Authentication
 
Chapter 13 Working with LDAP Controls
How LDAP Controls Work
Using Controls in the LDAP Java Classes
Determining the Controls Supported By the Server
Using the Server-Side Sorting Control
Specifying the Sort Order
Creating the Control
Performing the Search
Interpreting the Results
Known Problems with Server Sorting
Example of Using the Server-Sorting Control
Using the Persistent Search Control
Creating the Control
Performing the Search
Example of Using the Persistent Search Control
Using the Entry Change Notification Control
Getting the Control
Working with Change Log Numbers
Using the Virtual List View Control
Using the Manage DSA IT Control
Using Password Policy Controls
Using the Proxied Authorization Control
 
Chapter 14 Using SASL Authentication
Understanding SASL
Preparing to Use SASL Authentication
Supporting SASL on the Server
Supporting SASL on the Client
Implementing javax.security.auth.callback
Using SASL in the Client
Using the External Mechanism
Additional SASL Mechanisms
For More Information
 
Chapter 15 Using the JNDI Service Provider
How JNDI Works
Netscape's LDAP Service Provider
Installing the Service Provider
Add the Provider to the Classpath
Specify the Service Provider when Creating the Initial Context
Add the JNDI object schema to the Directory (Optional)
     Updating Netscape Directory Server 4.1

     Updating Pre-4.1 Netscape Directory Servers

JNDI Environment Properties
Working with Controls
 
Chapter 16 Working with Extended Operations
How Extended Operations Work
Implementing Support for Extended Operations on the Server
Determining the Extended Operations Supported
Performing an Extended Operation
Example: Extended Operation
 
Chapter 17 Using the Asynchronous Interface
Synchronous vs. Asynchronous Connections
Common Uses for the Asynchronous Interface
New Classes in the Asynchronous Interface
Performing Asynchronous Searches
Searching Multiple Servers
Multiple Search Statements
Where to Go for More Information
 
Glossary
 
Index
 

© Copyright 1999 Netscape Communications Corporation. All rights reserved.