From 6dd9a7856b2f6aae7cb6547ab6670125eb5bc0e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 19 May 2016 12:51:56 +0200 Subject: [PATCH] added new business method confirmAccount() for account confirmation ... --- .../model/user/UserSessionBeanRemote.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java index e2a65ab..c739151 100644 --- a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java +++ b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java @@ -22,6 +22,8 @@ import javax.ejb.Remote; import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNotFoundException; +import org.mxchange.jusercore.exceptions.UserStatusConfirmedException; +import org.mxchange.jusercore.exceptions.UserStatusLockedException; /** * An interface for user beans @@ -31,6 +33,20 @@ import org.mxchange.jusercore.exceptions.UserNotFoundException; @Remote public interface UserSessionBeanRemote extends Serializable { + /** + * Changes the user' account status to CONFIRMED if the status is + * UNCONFIRMED, else propper exceptions are thrown. + *

+ * @param user Unconfirmed user instance + * @param baseUrl Base URL + *

+ * @return Updated user instance + *

+ * @throws UserStatusConfirmedException If the user account is confirmed + * @throws UserStatusLockedException If the user account is locked + */ + User confirmAccount (final User user, final String baseUrl) throws UserStatusConfirmedException, UserStatusLockedException; + /** * Generates random user name that is available. *

-- 2.39.5