uTools-Manuals/docs/java/javax/naming/directory/package-summary.html

212 lines
9.8 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<h1 class="title" title="Package">Package javax.naming.directory</h1>
<div class="docSummary">
<div class="block">
扩展
<tt>javax.naming</tt>包以提供访问目录服务的功能。
</div>
</div>
<p>See: <a href="#package.description">描述</a></p>
</div><div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" class="typeSummary" summary="Interface Summary table, listing interfaces, and an explanation">
<caption>
<span>接口摘要</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">接口</th>
<th class="colLast" scope="col">描述</th>
</tr>
</tbody>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../javax/naming/directory/Attribute.html" title="interface in javax.naming.directory">Attribute</a></td>
<td class="colLast">
<div class="block">
此接口表示与命名对象关联的属性。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../javax/naming/directory/Attributes.html" title="interface in javax.naming.directory">Attributes</a></td>
<td class="colLast">
<div class="block">
此接口表示属性的集合。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../javax/naming/directory/DirContext.html" title="interface in javax.naming.directory">DirContext</a></td>
<td class="colLast">
<div class="block">
目录服务界面,包含检查和更新与对象关联的属性以及搜索目录的方法。
</div> </td>
</tr>
</tbody>
</table> </li>
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" class="typeSummary" summary="Class Summary table, listing classes, and an explanation">
<caption>
<span>类摘要</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col"></th>
<th class="colLast" scope="col">描述</th>
</tr>
</tbody>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../javax/naming/directory/BasicAttribute.html" title="class in javax.naming.directory">BasicAttribute</a></td>
<td class="colLast">
<div class="block">
这个类提供了
<tt>Attribute</tt>接口的基本实现。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../javax/naming/directory/BasicAttributes.html" title="class in javax.naming.directory">BasicAttributes</a></td>
<td class="colLast">
<div class="block">
该类提供了Attributes界面的基本实现。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../javax/naming/directory/InitialDirContext.html" title="class in javax.naming.directory">InitialDirContext</a></td>
<td class="colLast">
<div class="block">
此类是执行目录操作的起始上下文。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../javax/naming/directory/ModificationItem.html" title="class in javax.naming.directory">ModificationItem</a></td>
<td class="colLast">
<div class="block">
此类表示修改项。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../javax/naming/directory/SearchControls.html" title="class in javax.naming.directory">SearchControls</a></td>
<td class="colLast">
<div class="block">
该类封装了确定搜索范围和搜索结果返回的因素。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../javax/naming/directory/SearchResult.html" title="class in javax.naming.directory">SearchResult</a></td>
<td class="colLast">
<div class="block">
该类表示由DirContext.search方法返回的NamingEnumeration中的一个项目。
</div> </td>
</tr>
</tbody>
</table> </li>
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" class="typeSummary" summary="Exception Summary table, listing exceptions, and an explanation">
<caption>
<span>异常摘要</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">异常</th>
<th class="colLast" scope="col">描述</th>
</tr>
</tbody>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../javax/naming/directory/AttributeInUseException.html" title="class in javax.naming.directory">AttributeInUseException</a></td>
<td class="colLast">
<div class="block">
当操作尝试添加已经存在的属性时,抛出此异常。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../javax/naming/directory/AttributeModificationException.html" title="class in javax.naming.directory">AttributeModificationException</a></td>
<td class="colLast">
<div class="block">
当尝试添加,删除或修改与属性(模式)定义或属性状态冲突的属性,其标识符或其值时,会抛出此异常。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../javax/naming/directory/InvalidAttributeIdentifierException.html" title="class in javax.naming.directory">InvalidAttributeIdentifierException</a></td>
<td class="colLast">
<div class="block">
当尝试添加以创建具有无效属性标识符的属性时,会抛出此异常。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../javax/naming/directory/InvalidAttributesException.html" title="class in javax.naming.directory">InvalidAttributesException</a></td>
<td class="colLast">
<div class="block">
尝试添加或修改不完整或不正确指定的属性集时,会抛出此异常。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../javax/naming/directory/InvalidAttributeValueException.html" title="class in javax.naming.directory">InvalidAttributeValueException</a></td>
<td class="colLast">
<div class="block">
当尝试向属性添加与属性的模式定义冲突的值时,将抛出此类。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../javax/naming/directory/InvalidSearchControlsException.html" title="class in javax.naming.directory">InvalidSearchControlsException</a></td>
<td class="colLast">
<div class="block">
当搜索操作的SearchControls的规范无效时抛出此异常。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../javax/naming/directory/InvalidSearchFilterException.html" title="class in javax.naming.directory">InvalidSearchFilterException</a></td>
<td class="colLast">
<div class="block">
当搜索过滤器的规范无效时抛出此异常。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../javax/naming/directory/NoSuchAttributeException.html" title="class in javax.naming.directory">NoSuchAttributeException</a></td>
<td class="colLast">
<div class="block">
尝试访问不存在的属性时抛出此异常。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../javax/naming/directory/SchemaViolationException.html" title="class in javax.naming.directory">SchemaViolationException</a></td>
<td class="colLast">
<div class="block">
当某种方法违反模式时,抛出此异常。
</div> </td>
</tr>
</tbody>
</table> </li>
</ul>
<a name="package.description">
<!-- --> </a>
<h2 title="Package javax.naming.directory Description">Package javax.naming.directory Description</h2>
<div class="block">
<span>扩展<tt>javax.naming</tt>软件包以提供访问目录服务的功能。</span>
<p> <span>该包定义了Java命名和目录接口<font size="-2"><sup>TM</sup></font> JNDI的目录操作。</span> <span>JNDI为以Java编程语言编写的应用程序提供命名和目录功能。</span> <span>它被设计为独立于任何特定的命名或目录服务实现。</span> <span>因此,可以以一种常见的方式访问各种服务 - 新的,新兴的和已经部署的服务。</span> </p>
<p> <span>此包允许应用程序检索和更新与存储在目录中的对象相关联的属性,并使用指定的属性搜索对象。</span> </p>
<h4> <span>目录上下文</span> </h4>
<span><tt>DirContext</tt>接口表示一个<em>目录上下文</em></span>
<span>它定义了用于检查和更新与<em>目录对象</em><em>目录条目</em>相关联的<em>属性的方法</em> ,因为它有时被称为。</span>
<p> <span>您可以使用<tt>getAttributes()</tt>来检索与目录对象关联的属性(为此提供名称)。</span> <span>属性使用<tt>modifyAttributes()</tt>修改。</span> <span>您可以使用此操作添加,替换或删除属性和/或属性值。</span> </p>
<p> <span><tt>DirContext</tt>也表现为通过在<tt>javax.naming</tt>封装延伸<tt>Context</tt>接口命名上下文。</span> <span>这意味着任何目录对象也可以提供命名上下文。</span> <span>例如,一个人的目录对象可能包含该人的属性,同时提供一个上下文来命名对象相对于该人,比如他的打印机和主目录。</span> </p>
<h4> <span>搜索</span> </h4>
<span><tt>DirContext</tt>包含用于执行目录的基于内容的搜索的方法。</span>
<span>在最简单和最常用的使用形式中,应用程序指定一组属性(可能具有特定值),以匹配并将该属性集提交到<tt>search()</tt>方法。</span>
<span>还有其他重载形式的<tt>search()</tt>支持更复杂的<em>搜索过滤器</em></span>
<h2> <span>包装规格</span> </h2>
<span>JNDI API规范及相关文档可在发现<a href="../../../../technotes/guides/jndi/index.html">JNDI documentation</a></span>
</div>
<dl>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
1.3
</dd>
</dl>
</div>