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
@Remote
public interface UserSessionBeanRemote extends Serializable {
+ /**
+ * Adds given user to database, if not found by user name or email address.
+ * <p>
+ * @param user User instance to add
+ * <p>
+ * @return Updated user instance
+ * @throws org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException When the user name is already used
+ * @throws org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException When the email address is already used
+ */
+ User addUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException;
+
/**
* Returns a list of all users. This is mostly suitable for administrative
* interfaces.
* <p>
* @return A list of all users
*/
- public List<User> allUsers ();
+ List<User> allUsers ();
/**
* Returns a list with all public and member-visible users. Members are