]> git.mxchange.org Git - jcontacts-business-lib.git/commitdiff
splitted contact remote interface into general and administrative purposes
authorRoland Häder <roland@mxchange.org>
Mon, 15 Aug 2016 10:39:33 +0000 (12:39 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 15 Aug 2016 10:39:33 +0000 (12:39 +0200)
src/org/mxchange/jcontacts/contact/AdminContactSessionBeanRemote.java [new file with mode: 0644]
src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java

diff --git a/src/org/mxchange/jcontacts/contact/AdminContactSessionBeanRemote.java b/src/org/mxchange/jcontacts/contact/AdminContactSessionBeanRemote.java
new file mode 100644 (file)
index 0000000..9ef3525
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.jcontacts.contact;
+
+import java.io.Serializable;
+import javax.ejb.Remote;
+import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
+
+/**
+ * A remote interface for administrative contact purposes
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Remote
+public interface AdminContactSessionBeanRemote extends Serializable {
+
+       /**
+        * Deletes given contact instance
+        * <p>
+        * @param contact Contact instance being deleted
+        */
+       void deleteContactData (final Contact contact);
+
+       /**
+        * Adds (persists) given contact instance, if not found. If successfull, the
+        * field contactId contains the running number, otherwise an exception is
+        * thrown.
+        *
+        * @param contact Contact to be added
+        * <p>
+        * @return Updated contact instance
+        * <p>
+        * @throws org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException
+        * Contact already found
+        */
+       Contact addContact (final Contact contact) throws ContactAlreadyAddedException;
+
+}
index bec0d53d3e7c150df2ff024abe9241e682fc0f25..94b34ba0c8a4804230c64ef401a83dbd98d79652 100644 (file)
@@ -19,7 +19,6 @@ package org.mxchange.jcontacts.contact;
 import java.io.Serializable;
 import java.util.List;
 import javax.ejb.Remote;
-import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
 import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
 
 /**
@@ -30,13 +29,6 @@ import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
 @Remote
 public interface ContactSessionBeanRemote extends Serializable {
 
-       /**
-        * Deletes given contact instance
-        * <p>
-        * @param contact Contact instance being deleted
-        */
-       void deleteContactData (final Contact contact);
-
        /**
         * Checks whether the given email address is already registered. The email
         * address should be validated by EmailAddressValidator before calling this
@@ -48,20 +40,6 @@ public interface ContactSessionBeanRemote extends Serializable {
         */
        boolean isEmailAddressRegistered (final String emailAddress);
 
-       /**
-        * Adds (persists) given contact instance, if not found. If successfull, the
-        * field contactId contains the running number, otherwise an exception is
-        * thrown.
-        *
-        * @param contact Contact to be added
-        * <p>
-        * @return Updated contact instance
-        * <p>
-        * @throws org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException
-        * Contact already found
-        */
-       Contact addContact (final Contact contact) throws ContactAlreadyAddedException;
-
        /**
         * Checks if the given contact can be found by checking the whole list.
         * <p>