From 66096ade9250b097eedc6a57992a5a2d09c9d1ff Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 12 Apr 2016 18:44:37 +0200 Subject: [PATCH] added business method addUser() --- .../model/user/UserSessionBeanRemote.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 -- 2.39.5