📄 usermanager.html
字号:
</DD></DL><HR><A NAME="accountExists(java.lang.String)"><!-- --></A><H3>accountExists</H3><PRE>public boolean <B>accountExists</B>(java.lang.String username) throws <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></PRE><DL><DD>Check whether a specified user's account exists. The login name is used for looking up the account.<DD><DL><DT><B>Parameters:</B><DD><CODE>usename</CODE> - The name of the user to be checked.<DT><B>Returns:</B><DD>true if the specified account exists<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></CODE> - if there was an error accessing the data backend.</DL></DD></DL><HR><A NAME="retrieve(java.lang.String)"><!-- --></A><H3>retrieve</H3><PRE>public <A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> <B>retrieve</B>(java.lang.String username) throws <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A>, <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></PRE><DL><DD>Retrieve a user from persistent storage using username as the key.<DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the name of the user.<DT><B>Returns:</B><DD>an User object.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></CODE> - if the user's record does not exist in the database.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></CODE> - if there is a problem accessing the storage.</DL></DD></DL><HR><A NAME="retrieve(org.apache.torque.util.Criteria)"><!-- --></A><H3>retrieve</H3><PRE>public <A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A>[] <B>retrieve</B>(org.apache.torque.util.Criteria criteria) throws <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></PRE><DL><DD>Retrieve a set of users that meet the specified criteria. As the keys for the criteria, you should use the constants that are defined in <A HREF="../../../../../org/apache/turbine/om/security/User.html"><CODE>User</CODE></A> interface, plus the names of the custom attributes you added to your user representation in the data storage. Use verbatim names of the attributes - without table name prefix in case of DB implementation.<DD><DL><DT><B>Parameters:</B><DD><CODE>criteria</CODE> - The criteria of selection.<DT><B>Returns:</B><DD>a List of users meeting the criteria.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></CODE> - if there is a problem accessing the storage.</DL></DD></DL><HR><A NAME="retrieve(java.lang.String, java.lang.String)"><!-- --></A><H3>retrieve</H3><PRE>public <A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> <B>retrieve</B>(java.lang.String username, java.lang.String password) throws <A HREF="../../../../../org/apache/turbine/util/security/PasswordMismatchException.html">PasswordMismatchException</A>, <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A>, <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></PRE><DL><DD>Retrieve a user from persistent storage using username as the key, and authenticate the user. The implementation may chose to authenticate to the server as the user whose data is being retrieved.<DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the name of the user.<DD><CODE>password</CODE> - the user supplied password.<DT><B>Returns:</B><DD>an User object.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/PasswordMismatchException.html">PasswordMismatchException</A></CODE> - if the supplied password was incorrect.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></CODE> - if the user's record does not exist in the database.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></CODE> - if there is a problem accessing the storage.</DL></DD></DL><HR><A NAME="store(org.apache.turbine.om.security.User)"><!-- --></A><H3>store</H3><PRE>public void <B>store</B>(<A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> user) throws <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A>, <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></PRE><DL><DD>Save an User object to persistent storage. User's record is required to exist in the storage.<DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - an User object to store.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></CODE> - if the user's record does not exist in the database.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></CODE> - if there is a problem accessing the storage.</DL></DD></DL><HR><A NAME="authenticate(org.apache.turbine.om.security.User, java.lang.String)"><!-- --></A><H3>authenticate</H3><PRE>public void <B>authenticate</B>(<A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> user, java.lang.String password) throws <A HREF="../../../../../org/apache/turbine/util/security/PasswordMismatchException.html">PasswordMismatchException</A>, <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A>, <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></PRE><DL><DD>Authenticate an User with the specified password. If authentication is successful the method returns nothing. If there are any problems, exception was thrown.<DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - an User object to authenticate.<DD><CODE>password</CODE> - the user supplied password.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/PasswordMismatchException.html">PasswordMismatchException</A></CODE> - if the supplied password was incorrect.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></CODE> - if the user's record does not exist in the database.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></CODE> - if there is a problem accessing the storage.</DL></DD></DL><HR><A NAME="createAccount(org.apache.turbine.om.security.User, java.lang.String)"><!-- --></A><H3>createAccount</H3><PRE>public void <B>createAccount</B>(<A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> user, java.lang.String initialPassword) throws <A HREF="../../../../../org/apache/turbine/util/security/EntityExistsException.html">EntityExistsException</A>, <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></PRE><DL><DD>Creates new user account with specified attributes.<DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - the object describing account to be created.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></CODE> - if there was an error accessing the data backend.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/EntityExistsException.html">EntityExistsException</A></CODE> - if the user account already exists.</DL></DD></DL><HR><A NAME="removeAccount(org.apache.turbine.om.security.User)"><!-- --></A><H3>removeAccount</H3><PRE>public void <B>removeAccount</B>(<A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> user) throws <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A>, <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></PRE><DL><DD>Removes an user account from the system.<DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - the object describing the account to be removed.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></CODE> - if there was an error accessing the data backend.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></CODE> - if the user account is not present.</DL></DD></DL><HR><A NAME="changePassword(org.apache.turbine.om.security.User, java.lang.String, java.lang.String)"><!-- --></A><H3>changePassword</H3><PRE>public void <B>changePassword</B>(<A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> user, java.lang.String oldPassword, java.lang.String newPassword) throws <A HREF="../../../../../org/apache/turbine/util/security/PasswordMismatchException.html">PasswordMismatchException</A>, <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A>, <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></PRE><DL><DD>Change the password for an User.<DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - an User to change password for.<DD><CODE>oldPassword</CODE> - the current password suplied by the user.<DD><CODE>newPassword</CODE> - the current password requested by the user.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/PasswordMismatchException.html">PasswordMismatchException</A></CODE> - if the supplied password was incorrect.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></CODE> - if the user's record does not exist in the database.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></CODE> - if there is a problem accessing the storage.</DL></DD></DL><HR><A NAME="forcePassword(org.apache.turbine.om.security.User, java.lang.String)"><!-- --></A><H3>forcePassword</H3><PRE>public void <B>forcePassword</B>(<A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> user, java.lang.String password) throws <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A>, <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></PRE><DL><DD>Forcibly sets new password for an User. This is supposed by the administrator to change the forgotten or compromised passwords. Certain implementatations of this feature would require administrative level access to the authenticating server / program.<DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - an User to change password for.<DD><CODE>password</CODE> - the new password.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></CODE> - if the user's record does not exist in the database.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A></CODE> - if there is a problem accessing the storage.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UserManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/turbine/services/security/SecurityService.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="UserManager.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR>Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -