]> git.mxchange.org Git - juser-lib.git/commitdiff
Continued with splitting remote interface:
authorRoland Häder <roland@mxchange.org>
Fri, 5 Aug 2016 10:54:46 +0000 (12:54 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 5 Aug 2016 10:54:46 +0000 (12:54 +0200)
- splitted user remote interface into general (old) and administrative user interface. This allows more distribution and not centralization of all business methods on one (then later even monolithic) EJB
- requires juser-lib.jar to be updated

src/org/mxchange/jusercore/model/user/AdminUserSessionBeanRemote.java [new file with mode: 0644]
src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java

diff --git a/src/org/mxchange/jusercore/model/user/AdminUserSessionBeanRemote.java b/src/org/mxchange/jusercore/model/user/AdminUserSessionBeanRemote.java
new file mode 100644 (file)
index 0000000..1b2a926
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.model.user;
+
+import java.io.Serializable;
+import javax.ejb.Remote;
+import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException;
+import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException;
+
+/**
+ * An interface for administrative user beans
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Remote
+public interface AdminUserSessionBeanRemote extends Serializable {
+
+       /**
+        * Creates the user instance and links it with the set contact instance
+        * <p>
+        * @param user User instance to
+        * <p>
+        * @return Updated user instance
+        * <p>
+        * @throws UserNameAlreadyRegisteredException When the user name is already
+        * used
+        * @throws EmailAddressAlreadyRegisteredException When the email address is
+        * already used
+        */
+       User linkUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException;
+
+       /**
+        * 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
+        * <p>
+        * @throws UserNameAlreadyRegisteredException When the user name is already
+        * used
+        * @throws EmailAddressAlreadyRegisteredException When the email address is
+        * already used
+        */
+       User addUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException;
+
+}
index 42a4267afe66aaeeb742f86679fddf06ea1a495b..8509e4a81347ca883e39af1faa9e24a130facd79 100644 (file)
@@ -19,8 +19,6 @@ 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;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
@@ -70,22 +68,6 @@ public interface UserSessionBeanRemote extends Serializable {
         */
        String generateRandomUserName ();
 
-       /**
-        * Creates the user instance and links it with the set contact instance
-        * <p>
-        * @param user User instance to
-        * <p>
-        * @return Updated user instance
-        * <p>
-        * @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 linkUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException;
-
        /**
         * Updates entiity from given user instance and returns updated instance.
         * <p>
@@ -108,22 +90,6 @@ public interface UserSessionBeanRemote extends Serializable {
         */
        User findUserById (final Long userId) throws UserNotFoundException;
 
-       /**
-        * 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
-        * <p>
-        * @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.