⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 securityservice.html

📁 turbine教程
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getUserClass()"><!-- --></A><H3>getUserClass</H3><PRE>public java.lang.Class <B>getUserClass</B>()                             throws <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></PRE><DL><DD>Returns the Class object for the implementation of User interface used by the system.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the implementation of User interface used by the system.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></CODE> - if the system's implementation of User         interface could not be determined.</DL></DD></DL><HR><A NAME="getUserInstance()"><!-- --></A><H3>getUserInstance</H3><PRE>public <A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> <B>getUserInstance</B>()                     throws <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></PRE><DL><DD>Construct a blank User object. This method calls getUserClass, and then creates a new object using the default constructor.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an object implementing User interface.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></CODE> - if the object could not be instantiated.</DL></DD></DL><HR><A NAME="accountExists(java.lang.String)"><!-- --></A><H3>accountExists</H3><PRE>public boolean <B>accountExists</B>(java.lang.String&nbsp;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></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - 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="accountExists(org.apache.turbine.om.security.User)"><!-- --></A><H3>accountExists</H3><PRE>public boolean <B>accountExists</B>(<A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A>&nbsp;user)                      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></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>user</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="getAuthenticatedUser(java.lang.String, java.lang.String)"><!-- --></A><H3>getAuthenticatedUser</H3><PRE>public <A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> <B>getAuthenticatedUser</B>(java.lang.String&nbsp;username,                                 java.lang.String&nbsp;password)                          throws <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A>,                                 <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A>,                                 <A HREF="../../../../../org/apache/turbine/util/security/PasswordMismatchException.html">PasswordMismatchException</A></PRE><DL><DD>Authenticates an user, and constructs an User object to represent him/her.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - The user name.<DD><CODE>password</CODE> - The user password.<DT><B>Returns:</B><DD>An authenticated Turbine User.<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 user account is not present.<DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/PasswordMismatchException.html">PasswordMismatchException</A></CODE> - if the supplied password was incorrect.</DL></DD></DL><HR><A NAME="getUser(java.lang.String)"><!-- --></A><H3>getUser</H3><PRE>public <A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> <B>getUser</B>(java.lang.String&nbsp;username)             throws <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A>,                    <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></PRE><DL><DD>Constructs an User object to represent a registered user of the application.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - The user name.<DT><B>Returns:</B><DD>A Turbine User.<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 user account is not present.</DL></DD></DL><HR><A NAME="getUsers(org.apache.torque.util.Criteria)"><!-- --></A><H3>getUsers</H3><PRE>public <A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A>[] <B>getUsers</B>(org.apache.torque.util.Criteria&nbsp;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></DL></DD><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="getAnonymousUser()"><!-- --></A><H3>getAnonymousUser</H3><PRE>public <A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A> <B>getAnonymousUser</B>()                      throws <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></PRE><DL><DD>Constructs an User object to represent an anonymous user of the application.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>An anonymous Turbine User.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></CODE> - if the anonymous User object couldn't be         constructed.</DL></DD></DL><HR><A NAME="saveUser(org.apache.turbine.om.security.User)"><!-- --></A><H3>saveUser</H3><PRE>public void <B>saveUser</B>(<A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A>&nbsp;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>Saves User's data in the permanent storage. The user account is required to exist in the storage.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></CODE> - if the user's account 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="addUser(org.apache.turbine.om.security.User, java.lang.String)"><!-- --></A><H3>addUser</H3><PRE>public void <B>addUser</B>(<A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A>&nbsp;user,                    java.lang.String&nbsp;password)             throws <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A>,                    <A HREF="../../../../../org/apache/turbine/util/security/EntityExistsException.html">EntityExistsException</A></PRE><DL><DD>Creates new user account with specified attributes.<DD><DL></DL></DD><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="removeUser(org.apache.turbine.om.security.User)"><!-- --></A><H3>removeUser</H3><PRE>public void <B>removeUser</B>(<A HREF="../../../../../org/apache/turbine/om/security/User.html">User</A>&nbsp;user)                throws <A HREF="../../../../../org/apache/turbine/util/security/DataBackendException.html">DataBackendException</A>,                       <A HREF="../../../../../org/apache/turbine/util/security/UnknownEntityException.html">UnknownEntityException</A></PRE><DL><DD>Removes an user account from the system.<DD><DL></DL></DD><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="encryptPassword(java.lang.String)"><!-- --></A><H3>encryptPassword</H3><PRE>public java.lang.String <B>encryptPassword</B>(java.lang.String&nbsp;password)</PRE><DL><DD>This method provides client-side encryption mechanism for passwords. This is an utility method that is used by other classes to maintain a consistent approach to encrypting password. The behavior of the method can be configured in service's properties.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>password</CODE> - the password to process<DT><B>Returns:</B><DD>processed password</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>&nbsp;user,                           java.lang.String&nbsp;oldPassword,                           java.lang.String&nbsp;newPassword)                    throws <A HREF="../../../../../org/apache/turbine/util/security/PasswordMismatchException.html">PasswordMismatchException</A>,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -