📄 usermanager.html
字号:
<TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/user/UserManager.html#getUsers(int, int)">getUsers</A></B>(int startIndex, int numResults)</CODE><BR> Returns an unmodifiable Collection of all users starting at <tt>startIndex</tt> with the given number of results.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/user/UserManager.html#isRegisteredUser(org.xmpp.packet.JID)">isRegisteredUser</A></B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> user)</CODE><BR> Returns true if the specified JID belongs to a local or remote registered user.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/user/UserManager.html#isRegisteredUser(java.lang.String)">isRegisteredUser</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> username)</CODE><BR> Returns true if the specified local username belongs to a registered local user.</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/user/UserManager.html#receivedAnswer(org.xmpp.packet.IQ)">receivedAnswer</A></B>(<A HREF="../../../../org/xmpp/packet/IQ.html" title="class in org.xmpp.packet">IQ</A> packet)</CODE><BR> Notification method indicating that a previously sent IQ packet has been answered.</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><!-- ============ 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="getUserProvider()"><!-- --></A><H3>getUserProvider</H3><PRE>public static <A HREF="../../../../org/jivesoftware/openfire/user/UserProvider.html" title="interface in org.jivesoftware.openfire.user">UserProvider</A> <B>getUserProvider</B>()</PRE><DL><DD>Returns the currently-installed UserProvider. <b>Warning:</b> in virtually all cases the user provider should not be used directly. Instead, the appropriate methods in UserManager should be called. Direct access to the user provider is only provided for special-case logic.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the current UserProvider.</DL></DD></DL><HR><A NAME="getInstance()"><!-- --></A><H3>getInstance</H3><PRE>public static <A HREF="../../../../org/jivesoftware/openfire/user/UserManager.html" title="class in org.jivesoftware.openfire.user">UserManager</A> <B>getInstance</B>()</PRE><DL><DD>Returns a singleton UserManager instance.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a UserManager instance.</DL></DD></DL><HR><A NAME="createUser(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>createUser</H3><PRE>public <A HREF="../../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A> <B>createUser</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> username, <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> password, <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> name, <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> email) throws <A HREF="../../../../org/jivesoftware/openfire/user/UserAlreadyExistsException.html" title="class in org.jivesoftware.openfire.user">UserAlreadyExistsException</A></PRE><DL><DD>Creates a new User. Required values are username and password. The email address and name can optionally be <tt>null</tt>, unless the UserProvider deems that either of them are required.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the new and unique username for the account.<DD><CODE>password</CODE> - the password for the account (plain text).<DD><CODE>name</CODE> - the name of the user, which can be <tt>null</tt> unless the UserProvider deems that it's required.<DD><CODE>email</CODE> - the email address to associate with the new account, which can be <tt>null</tt>, unless the UserProvider deems that it's required.<DT><B>Returns:</B><DD>a new User.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserAlreadyExistsException.html" title="class in org.jivesoftware.openfire.user">UserAlreadyExistsException</A></CODE> - if the username already exists in the system.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the provider does not support the operation.</DL></DD></DL><HR><A NAME="deleteUser(org.jivesoftware.openfire.user.User)"><!-- --></A><H3>deleteUser</H3><PRE>public void <B>deleteUser</B>(<A HREF="../../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A> user)</PRE><DL><DD>Deletes a user (optional operation).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - the user to delete.</DL></DD></DL><HR><A NAME="getUser(java.lang.String)"><!-- --></A><H3>getUser</H3><PRE>public <A HREF="../../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A> <B>getUser</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> username) throws <A HREF="../../../../org/jivesoftware/openfire/user/UserNotFoundException.html" title="class in org.jivesoftware.openfire.user">UserNotFoundException</A></PRE><DL><DD>Returns the User specified by username.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username of the user.<DT><B>Returns:</B><DD>the User that matches <tt>username</tt>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserNotFoundException.html" title="class in org.jivesoftware.openfire.user">UserNotFoundException</A></CODE> - if the user does not exist.</DL></DD></DL><HR><A NAME="getUserCount()"><!-- --></A><H3>getUserCount</H3><PRE>public int <B>getUserCount</B>()</PRE><DL><DD>Returns the total number of users in the system.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the total number of users.</DL></DD></DL><HR><A NAME="getUsers()"><!-- --></A><H3>getUsers</H3><PRE>public <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="../../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A>> <B>getUsers</B>()</PRE><DL><DD>Returns an unmodifiable Collection of all users in the system.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an unmodifiable Collection of all users.</DL></DD></DL><HR><A NAME="getUsernames()"><!-- --></A><H3>getUsernames</H3><PRE>public <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>> <B>getUsernames</B>()</PRE><DL><DD>Returns an unmodifiable Collection of usernames of all users in the system.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an unmodifiable Collection of all usernames in the system.</DL></DD></DL><HR><A NAME="getUsers(int, int)"><!-- --></A><H3>getUsers</H3><PRE>public <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="../../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A>> <B>getUsers</B>(int startIndex, int numResults)</PRE><DL><DD>Returns an unmodifiable Collection of all users starting at <tt>startIndex</tt> with the given number of results. This is useful to support pagination in a GUI where you may only want to display a certain number of results per page. It is possible that the number of results returned will be less than that specified by <tt>numResults</tt> if <tt>numResults</tt> is greater than the number of records left to display.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>startIndex</CODE> - the beginning index to start the results at.<DD><CODE>numResults</CODE> - the total number of results to return.<DT><B>Returns:</B><DD>a Collection of users in the specified range.</DL></DD></DL><HR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -