package.html revision 2362
325N/A<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
325N/A<html>
325N/A<head>
325N/A<!--
325N/ACopyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
325N/ADO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
325N/A
325N/AThis code is free software; you can redistribute it and/or modify it
325N/Aunder the terms of the GNU General Public License version 2 only, as
325N/Apublished by the Free Software Foundation. Oracle designates this
325N/Aparticular file as subject to the "Classpath" exception as provided
325N/Aby Oracle in the LICENSE file that accompanied this code.
325N/A
325N/AThis code is distributed in the hope that it will be useful, but WITHOUT
325N/AANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
325N/AFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
325N/Aversion 2 for more details (a copy is included in the LICENSE file that
325N/Aaccompanied this code).
325N/A
325N/AYou should have received a copy of the GNU General Public License version
325N/A2 along with this work; if not, write to the Free Software Foundation,
325N/AInc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
325N/A
325N/APlease contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
325N/ACA 95054 USA or visit www.sun.com if you need additional information or
325N/Ahave any questions.
325N/A-->
325N/A</head>
325N/A<body bgcolor="white">
325N/A
325N/AExtends the <tt>javax.naming</tt> package to provide functionality
for accessing directory services.
<p>
This package defines the directory operations of the Java Naming and
Directory Interface<font size=-2><sup>TM</sup></font> (JNDI). &nbsp;
JNDI provides naming and directory functionality to applications
written in the Java programming language. It is designed to be
independent of any specific naming or directory service
implementation. Thus a variety of services--new, emerging, and
already deployed ones--can be accessed in a common way.
<p>
This package allows applications to retrieve and update attributes
associated with objects stored in a directory, and to search for
objects using specified attributes.
<h4>The Directory Context</h4>
The <tt>DirContext</tt>
interface represents a <em>directory context</em>.
It defines methods for examining and updating attributes associated with a
<em>directory object</em>, or <em>directory entry</em> as it is sometimes
called.
<p>
You use <tt>getAttributes()</tt> to retrieve the attributes
associated with a directory object (for which you supply the name).
Attributes are modified using <tt>modifyAttributes()</tt>.
You can add, replace, or remove attributes and/or attribute values
using this operation.
<p>
<tt>DirContext</tt> also behaves as a naming context
by extending the <tt>Context</tt> interface in the <tt>javax.naming</tt> package.
This means that any directory object can also provide
a naming context.
For example, the directory object for a person might contain
the attributes of that person, and at the same time provide
a context for naming objects relative to that person
such as his printers and home directory.
<h4>Searches</h4>
<tt>DirContext</tt> contains methods for
performing content-based searching of the directory.
In the simplest and most common form of usage, the application
specifies a set of attributes--possibly with specific
values--to match, and submits this attribute set, to the
<tt>search()</tt> method.
There are other overloaded forms of <tt>search()</tt>
that support more sophisticated <em>search filters</em>.
<h2>Package Specification</h2>
The JNDI API Specification and related documents can be found in the
<a href="/technotes/guides/jndi/index.html">JNDI documentation</a>.
@since 1.3
</body>
</html>