From: Roland Häder Date: Wed, 3 Aug 2016 13:16:01 +0000 (+0200) Subject: Continued with user passwords: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=108cc6a50515e3d4ef9ab0ca43ff613d867f7433;p=juser-activity-lib.git Continued with user passwords: - added business method for changing user passwords. You should not use other methods here as they don't write an entry into user password history. --- diff --git a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java index c739151..1ebe729 100644 --- a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java +++ b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java @@ -24,6 +24,7 @@ import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.exceptions.UserStatusConfirmedException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; +import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException; /** * An interface for user beans @@ -33,6 +34,20 @@ import org.mxchange.jusercore.exceptions.UserStatusLockedException; @Remote public interface UserSessionBeanRemote extends Serializable { + /** + * Updates user's password (must be set encrypted before calling this + * method) and records the password change in user's password history. + *

+ * @param user User instance with updated password + *

+ * @return Updated user instance + * + * @throws UserNotFoundException If the user is not found + * @throws UserStatusUnconfirmedException If the user status is unconfirmed + * @throws UserStatusLockedException If the user status is locked + */ + User updateUserPassword (final User user) throws UserNotFoundException, UserStatusUnconfirmedException, UserStatusLockedException; + /** * Changes the user' account status to CONFIRMED if the status is * UNCONFIRMED, else propper exceptions are thrown.