📄 ldapmanager.html
字号:
<CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setAdminPassword(java.lang.String)">setAdminPassword</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> adminPassword)</CODE><BR> Sets the admin password for the LDAP server we're connecting to.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setAlternateBaseDN(java.lang.String)">setAlternateBaseDN</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> alternateBaseDN)</CODE><BR> Sets the alternate starting DN that searches for users will performed with.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setBaseDN(java.lang.String)">setBaseDN</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> baseDN)</CODE><BR> Sets the starting DN that searches for users will performed with.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setConnectionPoolEnabled(boolean)">setConnectionPoolEnabled</A></B>(boolean connectionPoolEnabled)</CODE><BR> Sets whether an LDAP connection pool should be used or not.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setDebugEnabled(boolean)">setDebugEnabled</A></B>(boolean debugEnabled)</CODE><BR> Sets whether LDAP connection debugging is turned on.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setEmailField(java.lang.String)">setEmailField</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> emailField)</CODE><BR> Sets the LDAP field name that the user's email address is stored in.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setFollowAliasReferralsEnabled(boolean)">setFollowAliasReferralsEnabled</A></B>(boolean followAliasReferrals)</CODE><BR> Sets whether LDAP alias referrals should be automatically followed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setFollowReferralsEnabled(boolean)">setFollowReferralsEnabled</A></B>(boolean followReferrals)</CODE><BR> Sets whether LDAP referrals should be automatically followed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setGroupDescriptionField(java.lang.String)">setGroupDescriptionField</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> groupDescriptionField)</CODE><BR> Sets the field used to describe a group.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setGroupMemberField(java.lang.String)">setGroupMemberField</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> groupMemberField)</CODE><BR> Sets the field used to list members within a group.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setGroupNameField(java.lang.String)">setGroupNameField</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> groupNameField)</CODE><BR> Sets the field name used for groups.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setGroupSearchFilter(java.lang.String)">setGroupSearchFilter</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> groupSearchFilter)</CODE><BR> Sets the search filter appended to the default filter when searching for groups.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setHosts(java.util.Collection)">setHosts</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> hosts)</CODE><BR> Sets the list of LDAP servers host; e.g., <tt>localhost</tt> or <tt>machine.example.com</tt>, etc.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setNameField(java.lang.String)">setNameField</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> nameField)</CODE><BR> Sets the LDAP field name that the user's name is stored in.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setPort(int)">setPort</A></B>(int port)</CODE><BR> Sets the LDAP server port number.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setPosixMode(boolean)">setPosixMode</A></B>(boolean posixMode)</CODE><BR> Sets whether the LDAP server is operating in Posix mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setSearchFilter(java.lang.String)">setSearchFilter</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> searchFilter)</CODE><BR> Sets the search filter appended to the default filter when searching for users.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setSslEnabled(boolean)">setSslEnabled</A></B>(boolean sslEnabled)</CODE><BR> Sets whether the connection to the LDAP server should be made via ssl or not.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setSubTreeSearch(boolean)">setSubTreeSearch</A></B>(boolean subTreeSearch)</CODE><BR> Sets whether the entire tree under the base DN will be searched (recursive search) when doing LDAP queries (finding users, groups, etc).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setUsernameField(java.lang.String)">setUsernameField</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> usernameField)</CODE><BR> Sets the LDAP field name that the username lookup will be performed on.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#setUsernameSuffix(java.lang.String)">setUsernameSuffix</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> usernameSuffix)</CODE><BR> Set the suffix appended to the username whenever LDAP lookups are performed.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="LdapManager(java.util.Map)"><!-- --></A><H3>LdapManager</H3><PRE>public <B>LdapManager</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> properties)</PRE><DL><DD>Constructs a new LdapManager instance. Typically, <A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html#getInstance()"><CODE>getInstance()</CODE></A> should be called instead of this method. LdapManager instances should only be created directly for testing purposes.<P><DL><DT><B>Parameters:</B><DD><CODE>properties</CODE> - the Map that contains properties used by the LDAP manager, such as LDAP host and base DN.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getInstance()"><!-- --></A><H3>getInstance</H3><PRE>public static <A HREF="../../../../org/jivesoftware/openfire/ldap/LdapManager.html" title="class in org.jivesoftware.openfire.ldap">LdapManager</A> <B>getInstance</B>()</PRE><DL><DD>Provides singleton access to an instance of the LdapManager class.<P><DD><DL><DT><B>Returns:</B><DD>an LdapManager instance.</DL></DD></DL><HR><A NAME="getContext()"><!-- --></A><H3>getContext</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/ldap/LdapContext.html" title="class or interface in javax.naming.ldap">LdapContext</A> <B>getContext</B>() throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/NamingException.html" title="class or interface in javax.naming">NamingException</A></PRE><DL><DD>Returns a DirContext for the LDAP server that can be used to perform
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -