From: Roland Haeder Date: Wed, 7 Oct 2015 10:05:09 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=693a5fd44d00d73e9a9ad2541f4c76e166993e62;p=juser-login-lib.git Continued: - added methods for checking user name and email address - renamed loginUser() to validateUserAccountStatus() - removed registerUser() as this bean is not doing registrations - updated jars Signed-off-by:Roland Häder --- diff --git a/lib/juser-core.jar b/lib/juser-core.jar index fb01a7a..cc3731c 100644 Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ diff --git a/src/org/mxchange/jusercore/model/login/UserLoginSessionBeanRemote.java b/src/org/mxchange/jusercore/model/login/UserLoginSessionBeanRemote.java index 1ddcce0..1bd74cb 100644 --- a/src/org/mxchange/jusercore/model/login/UserLoginSessionBeanRemote.java +++ b/src/org/mxchange/jusercore/model/login/UserLoginSessionBeanRemote.java @@ -32,12 +32,13 @@ import org.mxchange.jusercore.model.user.User; public interface UserLoginSessionBeanRemote extends Serializable { /** - * Registers given user data, if not yet found + * Validates if the user is a confirmed account and returns the full user instance *

* @param user User instance to register + * @return Full confirmed user account * @throws org.mxchange.jusercore.exceptions.UserNotFoundException If the user account was not found * @throws org.mxchange.jusercore.exceptions.UserStatusLockedException If the user account is locked * @throws org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException If the user account is unconfirmed */ - public void loginUser (final User user) throws UserNotFoundException, UserStatusLockedException, UserStatusUnconfirmedException; + public User validateUserAccountStatus (final User user) throws UserNotFoundException, UserStatusLockedException, UserStatusUnconfirmedException; } diff --git a/src/org/mxchange/jusercore/model/register/UserRegistrationSessionBeanRemote.java b/src/org/mxchange/jusercore/model/register/UserRegistrationSessionBeanRemote.java index 1f68bda..f03fab6 100644 --- a/src/org/mxchange/jusercore/model/register/UserRegistrationSessionBeanRemote.java +++ b/src/org/mxchange/jusercore/model/register/UserRegistrationSessionBeanRemote.java @@ -39,4 +39,20 @@ public interface UserRegistrationSessionBeanRemote extends Serializable { * @throws org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException If the email address has already been registered */ public User registerUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException; + + /** + * Checks if the user's name is already registered + * + * @param user User instance to check + * @return Whether the user's name has already been registered + */ + public boolean isUserNameRegistered (final User user); + + /** + * Checks if the user's email address is already registered + * + * @param user User instance to check + * @return Whether the user's email address has already been registered + */ + public boolean isEmailAddressRegistered (final User user); } diff --git a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java index ebae0b4..ed47256 100644 --- a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java +++ b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java @@ -19,8 +19,6 @@ package org.mxchange.jusercore.model.user; import java.io.Serializable; import java.util.List; import javax.ejb.Remote; -import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; -import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; /** * An interface for user beans @@ -40,14 +38,14 @@ public interface UserSessionBeanRemote extends Serializable { /** * Some "getter" for a full user name list - * + *

* @return User name list */ public List getUserNameList (); /** * Some "getter" for a full email address list - * + *

* @return User name list */ public List getEmailAddressList (); @@ -67,14 +65,4 @@ public interface UserSessionBeanRemote extends Serializable { * @return Whether the user is already registered */ public boolean isEmailAddressReqistered (final User user); - - /** - * Registers the user. - *

- * @param user Initial customer instance - * @return Prepared Customer instance - * @throws org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException If the user's user name is already registered. - * @throws org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException If the user's email address is already registered. - */ - public User registerUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException; }