From 108cc6a50515e3d4ef9ab0ca43ff613d867f7433 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 3 Aug 2016 15:16:01 +0200 Subject: [PATCH] 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. --- .../model/user/UserSessionBeanRemote.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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. -- 2.39.5