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
* <p>
* @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;
}
* @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);
}
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
/**
* Some "getter" for a full user name list
- *
+ * <p>
* @return User name list
*/
public List<String> getUserNameList ();
/**
* Some "getter" for a full email address list
- *
+ * <p>
* @return User name list
*/
public List<String> getEmailAddressList ();
* @return Whether the user is already registered
*/
public boolean isEmailAddressReqistered (final User user);
-
- /**
- * Registers the user.
- * <p>
- * @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;
}