From: Roland Häder Date: Thu, 19 May 2016 10:51:56 +0000 (+0200) Subject: added new business method confirmAccount() for account confirmation ... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6dd9a7856b2f6aae7cb6547ab6670125eb5bc0e3;p=juser-login-lib.git added new business method confirmAccount() for account confirmation ... --- 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. *