📄 userprovider.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/user/UserProvider.html#loadUser(java.lang.String)">loadUser</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> Loads the specified user by username.</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/UserProvider.html#setCreationDate(java.lang.String, java.util.Date)">setCreationDate</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, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> creationDate)</CODE><BR> Sets the date the user was created.</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/UserProvider.html#setEmail(java.lang.String, java.lang.String)">setEmail</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, <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)</CODE><BR> Sets the user's email address.</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/UserProvider.html#setModificationDate(java.lang.String, java.util.Date)">setModificationDate</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, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> modificationDate)</CODE><BR> Sets the date the user was last modified.</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/UserProvider.html#setName(java.lang.String, java.lang.String)">setName</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, <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)</CODE><BR> Sets the user's name.</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="loadUser(java.lang.String)"><!-- --></A><H3>loadUser</H3><PRE><A HREF="../../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A> <B>loadUser</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>Loads the specified user by username.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username<DT><B>Returns:</B><DD>the User.<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 could not be loaded.</DL></DD></DL><HR><A NAME="createUser(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>createUser</H3><PRE><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. This method should throw an UnsupportedOperationException if this operation is not supporte by the backend user store.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username.<DD><CODE>password</CODE> - the plain-text password.<DD><CODE>name</CODE> - the user's name, which can be <tt>null</tt>, unless isNameRequired is set to true.<DD><CODE>email</CODE> - the user's email address, which can be <tt>null</tt>, unless isEmailRequired is set to true.<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 is already in use.</DL></DD></DL><HR><A NAME="deleteUser(java.lang.String)"><!-- --></A><H3>deleteUser</H3><PRE>void <B>deleteUser</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)</PRE><DL><DD>Delets a user. This method should throw an UnsupportedOperationException if this operation is not supported by the backend user store.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username to delete.</DL></DD></DL><HR><A NAME="getUserCount()"><!-- --></A><H3>getUserCount</H3><PRE>int <B>getUserCount</B>()</PRE><DL><DD>Returns the number of users in the system.<P><DD><DL><DT><B>Returns:</B><DD>the total number of users.</DL></DD></DL><HR><A NAME="getUsers()"><!-- --></A><H3>getUsers</H3><PRE><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 Collections of all users in the system. The <A HREF="../../../../org/jivesoftware/openfire/user/UserCollection.html" title="class in org.jivesoftware.openfire.user"><CODE>UserCollection</CODE></A> class can be used to assist in the implementation of this method. It takes a String [] of usernames and presents it as a Collection of User objects (obtained with calls to <A HREF="../../../../org/jivesoftware/openfire/user/UserManager.html#getUser(java.lang.String)"><CODE>UserManager.getUser(String)</CODE></A>.<P><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><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><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><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 Collections of users in the system within the specified range. The <A HREF="../../../../org/jivesoftware/openfire/user/UserCollection.html" title="class in org.jivesoftware.openfire.user"><CODE>UserCollection</CODE></A> class can be used to assist in the implementation of this method. It takes a String [] of usernames and presents it as a Collection of User objects (obtained with calls to <A HREF="../../../../org/jivesoftware/openfire/user/UserManager.html#getUser(java.lang.String)"><CODE>UserManager.getUser(String)</CODE></A>.<p> 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><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>an unmodifiable Collection of users within the specified range.</DL></DD></DL><HR><A NAME="setName(java.lang.String, java.lang.String)"><!-- --></A><H3>setName</H3><PRE>void <B>setName</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> name) throws <A HREF="../../../../org/jivesoftware/openfire/user/UserNotFoundException.html" title="class in org.jivesoftware.openfire.user">UserNotFoundException</A></PRE><DL><DD>Sets the user's name. This method should throw an UnsupportedOperationException if this operation is not supported by the backend user store.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username.<DD><CODE>name</CODE> - the name.<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 could not be found.</DL></DD></DL><HR><A NAME="setEmail(java.lang.String, java.lang.String)"><!-- --></A><H3>setEmail</H3><PRE>void <B>setEmail</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> email) throws <A HREF="../../../../org/jivesoftware/openfire/user/UserNotFoundException.html" title="class in org.jivesoftware.openfire.user">UserNotFoundException</A></PRE><DL><DD>Sets the user's email address. This method should throw an UnsupportedOperationException if this operation is not supported by the backend user store.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username.<DD><CODE>email</CODE> - the email address.<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 could not be found.</DL></DD></DL><HR><A NAME="setCreationDate(java.lang.String, java.util.Date)"><!-- --></A><H3>setCreationDate</H3><PRE>void <B>setCreationDate</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/util/Date.html" title="class or interface in java.util">Date</A> creationDate)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -