This interface represents an attribute associated with a named object.
This interface represents a collection of attributes.
The directory service interface, containing methods for examining and updating attributes associated with objects, and for searching the directory.
This class provides a basic implementation of the Attribute interface.
This class provides a basic implementation of the Attributes interface.
This class is the starting context for performing directory operations.
This class represents a modification item.
This class encapsulates factors that determine scope of search and what gets returned as a result of the search.
This class represents an item in the NamingEnumeration returned as a result of the DirContext.search() methods.
This exception is thrown when an operation attempts to add an attribute that already exists.
This exception is thrown when an attempt is made to add, or remove, or modify an attribute, its identifier, or its values that conflicts with the attribute's (schema) definition or the attribute's state.
This exception is thrown when an attempt is made to add to create an attribute with an invalid attribute identifier.
This exception is thrown when an attempt is made to add or modify an attribute set that has been specified incompletely or incorrectly.
This class is thrown when an attempt is made to add to an attribute a value that conflicts with the attribute's schema definition.
This exception is thrown when the specification of the SearchControls for a search operation is invalid.
This exception is thrown when the specification of a search filter is invalid.
This exception is thrown when attempting to access an attribute that does not exist.
This exception is thrown when a method in some ways violates the schema.
This package defines the directory operations of the Java Naming and Directory InterfaceTM (JNDI). 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.
This package allows applications to retrieve and update attributes associated with objects stored in a directory, and to search for objects using specified attributes.
You use getAttributes() to retrieve the attributes associated with a directory object (for which you supply the name). Attributes are modified using modifyAttributes(). You can add, replace, or remove attributes and/or attribute values using this operation.
DirContext also behaves as a naming context by extending the Context interface in the javax.naming 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.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.