📄 defaultuserprovider.html
字号:
<CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/user/DefaultUserProvider.html#getUserCount()">getUserCount</A></B>()</CODE><BR> Returns the number of users in the system.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <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>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/user/DefaultUserProvider.html#getUsernames()">getUsernames</A></B>()</CODE><BR> Returns an unmodifiable Collection of usernames of all users in the system.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <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>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/user/DefaultUserProvider.html#getUsers()">getUsers</A></B>()</CODE><BR> Returns an unmodifiable Collections of all users in the system.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <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>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/user/DefaultUserProvider.html#getUsers(int, int)">getUsers</A></B>(int startIndex, int numResults)</CODE><BR> Returns an unmodifiable Collections of users in the system within the specified range.</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/DefaultUserProvider.html#isEmailRequired()">isEmailRequired</A></B>()</CODE><BR> Returns true if this UserProvider requires an email address to be set on User objects.</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/DefaultUserProvider.html#isNameRequired()">isNameRequired</A></B>()</CODE><BR> Returns true if this UserProvider requires a name to be set on User objects.</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/DefaultUserProvider.html#isReadOnly()">isReadOnly</A></B>()</CODE><BR> Returns true if this UserProvider is read-only.</TD></TR><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/DefaultUserProvider.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/DefaultUserProvider.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/DefaultUserProvider.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/DefaultUserProvider.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/DefaultUserProvider.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> <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="DefaultUserProvider()"><!-- --></A><H3>DefaultUserProvider</H3><PRE>public <B>DefaultUserProvider</B>()</PRE><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="loadUser(java.lang.String)"><!-- --></A><H3>loadUser</H3><PRE>public <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><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserProvider.html#loadUser(java.lang.String)">UserProvider</A></CODE></B></DD><DD>Loads the specified user by username.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserProvider.html#loadUser(java.lang.String)">loadUser</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserProvider.html" title="interface in org.jivesoftware.openfire.user">UserProvider</A></CODE></DL></DD><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>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><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserProvider.html#createUser(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">UserProvider</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserProvider.html#createUser(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">createUser</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserProvider.html" title="interface in org.jivesoftware.openfire.user">UserProvider</A></CODE></DL></DD><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>public 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><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserProvider.html#deleteUser(java.lang.String)">UserProvider</A></CODE></B></DD><DD>Delets a user. This method should throw an UnsupportedOperationException if this operation is not supported by the backend user store.<P><DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -