📄 dircontext.html
字号:
<TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getAttributes(javax.naming.Name)"><!-- --></A><H3>getAttributes</H3><PRE>public <A HREF="../../../javax/naming/directory/Attributes.html">Attributes</A> <B>getAttributes</B>(<A HREF="../../../javax/naming/Name.html">Name</A> name) throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Retrieves all of the attributes associated with a named object. See the class description regarding attribute models, attribute type names, and operational attributes.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object from which to retrieve attributes<DT><B>Returns:</B><DD>the set of attributes associated with <code>name</code>. Returns an empty attribute set if name has no attributes; never null.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - if a naming exception is encountered<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/directory/DirContext.html#getAttributes(java.lang.String)"><CODE>getAttributes(String)</CODE></A>, <A HREF="../../../javax/naming/directory/DirContext.html#getAttributes(javax.naming.Name, java.lang.String[])"><CODE>getAttributes(Name, String[])</CODE></A></DL></DD></DL><HR><A NAME="getAttributes(java.lang.String)"><!-- --></A><H3>getAttributes</H3><PRE>public <A HREF="../../../javax/naming/directory/Attributes.html">Attributes</A> <B>getAttributes</B>(<A HREF="../../../java/lang/String.html">String</A> name) throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Retrieves all of the attributes associated with a named object. See <A HREF="../../../javax/naming/directory/DirContext.html#getAttributes(javax.naming.Name)"><CODE>getAttributes(Name)</CODE></A> for details.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object from which to retrieve attributes<DT><B>Returns:</B><DD>the set of attributes associated with <code>name</code><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - if a naming exception is encountered</DL></DD></DL><HR><A NAME="getAttributes(javax.naming.Name, java.lang.String[])"><!-- --></A><H3>getAttributes</H3><PRE>public <A HREF="../../../javax/naming/directory/Attributes.html">Attributes</A> <B>getAttributes</B>(<A HREF="../../../javax/naming/Name.html">Name</A> name, <A HREF="../../../java/lang/String.html">String</A>[] attrIds) throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Retrieves selected attributes associated with a named object. See the class description regarding attribute models, attribute type names, and operational attributes. <p> If the object does not have an attribute specified, the directory will ignore the nonexistent attribute and return those requested attributes that the object does have. <p> A directory might return more attributes than was requested (see <strong>Attribute Type Names</strong> in the class description), but is not allowed to return arbitrary, unrelated attributes. <p> See also <strong>Operational Attributes</strong> in the class description.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object from which to retrieve attributes<DD><CODE>attrIds</CODE> - the identifiers of the attributes to retrieve. null indicates that all attributes should be retrieved; an empty array indicates that none should be retrieved.<DT><B>Returns:</B><DD>the requested attributes; never null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - if a naming exception is encountered</DL></DD></DL><HR><A NAME="getAttributes(java.lang.String, java.lang.String[])"><!-- --></A><H3>getAttributes</H3><PRE>public <A HREF="../../../javax/naming/directory/Attributes.html">Attributes</A> <B>getAttributes</B>(<A HREF="../../../java/lang/String.html">String</A> name, <A HREF="../../../java/lang/String.html">String</A>[] attrIds) throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Retrieves selected attributes associated with a named object. See <A HREF="../../../javax/naming/directory/DirContext.html#getAttributes(javax.naming.Name, java.lang.String[])"><CODE>getAttributes(Name, String[])</CODE></A> for details.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the object from which to retrieve attributes<DD><CODE>attrIds</CODE> - the identifiers of the attributes to retrieve. null indicates that all attributes should be retrieved; an empty array indicates that none should be retrieved.<DT><B>Returns:</B><DD>the requested attributes; never null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - if a naming exception is encountered</DL></DD></DL><HR><A NAME="modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes)"><!-- --></A><H3>modifyAttributes</H3><PRE>public void <B>modifyAttributes</B>(<A HREF="../../../javax/naming/Name.html">Name</A> name, int mod_op, <A HREF="../../../javax/naming/directory/Attributes.html">Attributes</A> attrs) throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Modifies the attributes associated with a named object. The order of the modifications is not specified. Where possible, the modifications are performed atomically.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object whose attributes will be updated<DD><CODE>mod_op</CODE> - the modification operation, one of: <code>ADD_ATTRIBUTE</code>, <code>REPLACE_ATTRIBUTE</code>, <code>REMOVE_ATTRIBUTE</code>.<DD><CODE>attrs</CODE> - the attributes to be used for the modification; may not be null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/directory/AttributeModificationException.html">AttributeModificationException</A></CODE> - if the modification cannot be completed successfully<DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - if a naming exception is encountered<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/directory/DirContext.html#modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[])"><CODE>modifyAttributes(Name, ModificationItem[])</CODE></A></DL></DD></DL><HR><A NAME="modifyAttributes(java.lang.String, int, javax.naming.directory.Attributes)"><!-- --></A><H3>modifyAttributes</H3><PRE>public void <B>modifyAttributes</B>(<A HREF="../../../java/lang/String.html">String</A> name, int mod_op, <A HREF="../../../javax/naming/directory/Attributes.html">Attributes</A> attrs) throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Modifies the attributes associated with a named object. See <A HREF="../../../javax/naming/directory/DirContext.html#modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes)"><CODE>modifyAttributes(Name, int, Attributes)</CODE></A> for details.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object whose attributes will be updated<DD><CODE>mod_op</CODE> - the modification operation, one of: <code>ADD_ATTRIBUTE</code>, <code>REPLACE_ATTRIBUTE</code>, <code>REMOVE_ATTRIBUTE</code>.<DD><CODE>attrs</CODE> - the attributes to be used for the modification; map not be null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/directory/AttributeModificationException.html">AttributeModificationException</A></CODE> - if the modification cannot be completed successfully<DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - if a naming exception is encountered</DL></DD></DL><HR><A NAME="modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[])"><!-- --></A><H3>modifyAttributes</H3><PRE>public void <B>modifyAttributes</B>(<A HREF="../../../javax/naming/Name.html">Name</A> name, <A HREF="../../../javax/naming/directory/ModificationItem.html">ModificationItem</A>[] mods) throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Modifies the attributes associated with a named object using an an ordered list of modifications. The modifications are performed in the order specified. Each modification specifies a modification operation code and an attribute on which to operate. Where possible, the modifications are performed atomically.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object whose attributes will be updated<DD><CODE>mods</CODE> - an ordered sequence of modifications to be performed; may not be null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/directory/AttributeModificationException.html">AttributeModificationException</A></CODE> - if the modifications cannot be completed successfully<DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - if a naming exception is encountered<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/directory/DirContext.html#modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes)"><CODE>modifyAttributes(Name, int, Attributes)</CODE></A>, <A HREF="../../../javax/naming/directory/ModificationItem.html"><CODE>ModificationItem</CODE></A></DL></DD></DL><HR><A NAME="modifyAttributes(java.lang.String, javax.naming.directory.ModificationItem[])"><!-- --></A><H3>modifyAttributes</H3><PRE>public void <B>modifyAttributes</B>(<A HREF="../../../java/lang/String.html">String</A> name, <A HREF="../../../javax/naming/directory/ModificationItem.html">ModificationItem</A>[] mods) throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Modifies the attributes associated with a named object using an an ordered list of modifications. See <A HREF="../../../javax/naming/directory/DirContext.html#modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[])"><CODE>modifyAttributes(Name, ModificationItem[])</CODE></A> for details.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the object whose attributes will be updated<DD><CODE>mods</CODE> - an ordered sequence of modifications to be performed; may not be null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/directory/AttributeModificationException.html">AttributeModificationException</A></CODE> - if the modifications cannot be completed successfully<DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - if a naming exception is encountered</DL></DD></DL><HR><A NAME="bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)"><!-- --></A><H3>bind</H3><PRE>public void <B>bind</B>(<A HREF="../../../javax/naming/Name.html">Name</A> name, <A HREF="../../../java/lang/Object.html">Object</A> obj, <A HREF="../../../javax/naming/directory/Attributes.html">Attributes</A> attrs) throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Binds a name to an object, along with associated attributes. If <tt>attrs</tt> is null, the resulting binding will have the attributes associated with <tt>obj</tt> if <tt>obj</tt> is a <tt>DirContext</tt>, and no attributes otherwise. If <tt>attrs</tt> is non-null, the resulting binding will have <tt>attrs</tt> as its attributes; any attributes associated with <tt>obj</tt> are ignored.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name to bind; may not be empty<DD><CODE>obj</CODE> - the object to bind; possibly null<DD><CODE>attrs</CODE> - the attributes to associate with the binding<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NameAlreadyBoundException.html">NameAlreadyBoundException</A></CODE> - if name is already bound<DD><CODE><A HREF="../../../javax/naming/directory/InvalidAttributesException.html">InvalidAttributesException</A></CODE> - if some "mandatory" attributes of the binding are not supplied<DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - if a naming exception is encountered<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/Context.html#bind(javax.naming.Name, java.lang.Object)"><CODE>Context.bind(Name, Object)</CODE></A>, <A HREF="../../../javax/naming/directory/DirContext.html#rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)"><CODE>rebind(Name, Object, Attributes)</CODE></A></DL></DD></DL><HR><A NAME="bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes)"><!-- --></A><H3>bind</H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -