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
|
|
|
| |
|
Preface
|
|
The Netscape Directory SDK 4.0 for Java Programmer's Guide documents
the Netscape Directory SDK 4.0 for Java, a development kit for
writing LDAP (Lightweight Directory Access Protocol) applications.
|
|
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
|
|
This chapter explains the LDAP protocol and the concepts behind
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
|
|
This chapter describes the Lightweight Directory Access Protocol
(LDAP) Java classes and 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
|
|
This chapter provides a simple example of an LDAP client written with
the Netscape Directory SDK for Java.
|
|
Understanding the Sample Client
|
|
Sample Code
|
|
|
Part 2
|
Writing Clients with the Netscape Directory SDK for Java
|
| |
Chapter 4
|
Writing an LDAP Client
|
|
This chapter describes the general process of writing an LDAP client.
The chapter covers the procedures for connecting to an LDAP server,
authenticating, requesting operations, and disconnecting from the
server.
|
|
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
|
|
This chapter covers some of the general LDAP Java classes that are
commonly used when writing LDAP clients.
|
|
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
|
|
This chapter explains how to use the LDAP Java classes to search the
directory and retrieve entries. The chapter also describes how to get attributes
and attribute values from an entry.
|
|
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
|
|
This chapter explains how to use API function to work with filter configuration
files. Filter configuration files can help simplify the process
of selecting the appropriate search filter for a search request.
|
|
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
|
|
This chapter explains how to use the LDAP Java classes to add, modify,
delete, and rename entries in the directory.
|
|
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
|
|
This chapter explains how to compare the value of an attribute in an
entry against a specified value.
|
|
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
|
|
This chapter describes what LDAP URLs are and explains how to use
LDAP URLs to search and retrieve data from the directory.
|
|
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
|
|
This chapter explains how to access and modify information about
your LDAP server over the LDAP protocol.
|
|
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
|
|
This chapter describes the process of enabling an LDAP client to connect
to an LDAP server over the Secure Sockets Layer (SSL) protocol.
The chapter covers the procedures for connecting to an LDAP server
and authenticating.
|
|
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
|
|
This chapter explains how LDAP controls work and how to use the
LDAP controls that are supported by the Netscape Directory Server.
|
|
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
|
|
This chapter describes the process of using a SASL mechanism to authenticate
an LDAP client to an LDAP server.
|
|
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
|
|
This chapter explains JNDI and shows you how to use Netscape's LDAP
Service Provider for JNDI.
|
|
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
|
|
This chapter explains how LDAP v3 extended operations work and
how to use the extended operations that are supported by your LDAP
server.
|
|
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
|
|
This chapter shows you how to use the Asynchronous Interface to
LDAP in Java applications.
|
|
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
|
|
This glossary defines terms commonly used when working with LDAP.
|
|
Index
|
|
|