import java.io.Serializable;
import javax.ejb.Remote;
-import org.mxchange.jusercore.exceptions.UserAlreadyRegisteredException;
+import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException;
+import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException;
import org.mxchange.jusercore.model.user.User;
/**
* <p>
* @param user User instance to register
* @return The fully registered user account
- * @throws org.mxchange.jusercore.exceptions.UserAlreadyRegisteredException If the user has already been registered
+ * @throws org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException If the user name has already been registered
+ * @throws org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException If the email address has already been registered
*/
- public User registerUser (final User user) throws UserAlreadyRegisteredException;
+ public User registerUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException;
}
package org.mxchange.jusercore.model.user;
import java.io.Serializable;
+import java.util.List;
import javax.ejb.Remote;
-import org.mxchange.jusercore.exceptions.UserAlreadyRegisteredException;
+import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException;
+import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException;
/**
* An interface for user beans
public User fillUserData (final User user);
/**
- * Checks if the the given user instance is already registered
+ * Some "getter" for a full user name list
+ *
+ * @return User name list
+ */
+ public List<String> getUserNameList ();
+
+ /**
+ * Some "getter" for a full email address list
+ *
+ * @return User name list
+ */
+ public List<String> getEmailAddressList ();
+
+ /**
+ * Checks if the the given user's name is already registered
+ * <p>
+ * @param user User instance
+ * @return Whether the user is already registered
+ */
+ public boolean isUserNameReqistered (final User user);
+
+ /**
+ * Checks if the the given user's email address is already registered
* <p>
* @param user User instance
* @return Whether the user is already registered
*/
- public boolean isReqistered (final User user);
+ public boolean isEmailAddressReqistered (final User user);
/**
* Registers the user.
* <p>
* @param user Initial customer instance
* @return Prepared Customer instance
- * @throws org.mxchange.jusercore.exceptions.UserAlreadyRegisteredException If the user is already registered.
+ * @throws org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException If the user name is already registered.
+ * @throws org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException If the email address is already registered
*/
- public User registerUser (final User user) throws UserAlreadyRegisteredException;
+ public User registerUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException;
}