From: Roland Haeder Date: Tue, 12 Apr 2016 16:44:37 +0000 (+0200) Subject: added business method addUser() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=66096ade9250b097eedc6a57992a5a2d09c9d1ff;p=juser-activity-lib.git added business method addUser() --- diff --git a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java index 0e59570..49ace59 100644 --- a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java +++ b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java @@ -19,6 +19,8 @@ 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 @@ -28,13 +30,24 @@ import javax.ejb.Remote; @Remote public interface UserSessionBeanRemote extends Serializable { + /** + * Adds given user to database, if not found by user name or email address. + *

+ * @param user User instance to add + *

+ * @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. *

* @return A list of all users */ - public List allUsers (); + List allUsers (); /** * Returns a list with all public and member-visible users. Members are