jdk/src/share/classes/javax/naming/directory/package.html
changeset 2 90ce3da70b43
child 5506 202f599c92aa
equal deleted inserted replaced
0:fd16c54261b3 2:90ce3da70b43
       
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
       
     2 <html>
       
     3 <head>
       
     4 <!--
       
     5 Copyright 1999-2006 Sun Microsystems, Inc.  All Rights Reserved.
       
     6 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     7 
       
     8 This code is free software; you can redistribute it and/or modify it
       
     9 under the terms of the GNU General Public License version 2 only, as
       
    10 published by the Free Software Foundation.  Sun designates this
       
    11 particular file as subject to the "Classpath" exception as provided
       
    12 by Sun in the LICENSE file that accompanied this code.
       
    13 
       
    14 This code is distributed in the hope that it will be useful, but WITHOUT
       
    15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    16 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    17 version 2 for more details (a copy is included in the LICENSE file that
       
    18 accompanied this code).
       
    19 
       
    20 You should have received a copy of the GNU General Public License version
       
    21 2 along with this work; if not, write to the Free Software Foundation,
       
    22 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    23 
       
    24 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
       
    25 CA 95054 USA or visit www.sun.com if you need additional information or
       
    26 have any questions.
       
    27 -->
       
    28 </head>
       
    29 <body bgcolor="white">
       
    30 
       
    31 Extends the <tt>javax.naming</tt> package to provide functionality
       
    32 for accessing directory services.
       
    33 
       
    34 <p>
       
    35 This package defines the directory operations of the Java Naming and
       
    36 Directory Interface<font size=-2><sup>TM</sup></font> (JNDI). &nbsp;
       
    37 JNDI provides naming and directory functionality to applications
       
    38 written in the Java programming language.  It is designed to be
       
    39 independent of any specific naming or directory service
       
    40 implementation.  Thus a variety of services--new, emerging, and
       
    41 already deployed ones--can be accessed in a common way.
       
    42 
       
    43 <p>
       
    44 This package allows applications to retrieve and update attributes
       
    45 associated with objects stored in a directory, and to search for
       
    46 objects using specified attributes.
       
    47 
       
    48 <h4>The Directory Context</h4>
       
    49 
       
    50 The <tt>DirContext</tt>
       
    51 interface represents a <em>directory context</em>.
       
    52 It defines methods for examining and updating attributes associated with a
       
    53 <em>directory object</em>, or <em>directory entry</em> as it is sometimes
       
    54 called.
       
    55 <p>
       
    56 You use	<tt>getAttributes()</tt> to retrieve the attributes 
       
    57 associated with a directory object (for which you supply the name).
       
    58 Attributes are modified using <tt>modifyAttributes()</tt>. 
       
    59 You can add, replace, or remove attributes and/or attribute values
       
    60 using this operation.
       
    61 <p>
       
    62 <tt>DirContext</tt> also behaves as a naming context
       
    63 by extending the <tt>Context</tt> interface in the <tt>javax.naming</tt> package.
       
    64 This means that any directory object can also provide
       
    65 a naming context. 
       
    66 For example, the directory object for a person might contain
       
    67 the attributes of that person, and at the same time provide
       
    68 a context for naming objects relative to that person
       
    69 such as his printers and home directory.
       
    70 
       
    71 <h4>Searches</h4>
       
    72 <tt>DirContext</tt> contains methods for 
       
    73 performing content-based searching of the directory.
       
    74 In the simplest and most common form of usage, the application
       
    75 specifies a set of attributes--possibly with specific 
       
    76 values--to match, and submits this attribute set, to the 
       
    77 <tt>search()</tt> method.
       
    78 There are other overloaded forms of <tt>search()</tt>
       
    79 that support more sophisticated <em>search filters</em>.
       
    80 
       
    81 
       
    82 <h2>Package Specification</h2>
       
    83 
       
    84 The JNDI API Specification and related documents can be found in the
       
    85 <a href="../../../../technotes/guides/jndi/index.html">JNDI documentation</a>.
       
    86 
       
    87 @since 1.3
       
    88 
       
    89 </body>
       
    90 </html>