From: Roland Häder Date: Mon, 15 Aug 2016 10:39:33 +0000 (+0200) Subject: splitted contact remote interface into general and administrative purposes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ffb1d98633697bdc5f3038d6175f5d8620e97681;p=jcontacts-lib.git splitted contact remote interface into general and administrative purposes --- diff --git a/src/org/mxchange/jcontacts/contact/AdminContactSessionBeanRemote.java b/src/org/mxchange/jcontacts/contact/AdminContactSessionBeanRemote.java new file mode 100644 index 0000000..9ef3525 --- /dev/null +++ b/src/org/mxchange/jcontacts/contact/AdminContactSessionBeanRemote.java @@ -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 . + */ +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 + *

+ * @author Roland Haeder + */ +@Remote +public interface AdminContactSessionBeanRemote extends Serializable { + + /** + * Deletes given contact instance + *

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

+ * @return Updated contact instance + *

+ * @throws org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException + * Contact already found + */ + Contact addContact (final Contact contact) throws ContactAlreadyAddedException; + +} diff --git a/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java b/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java index bec0d53..94b34ba 100644 --- a/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java +++ b/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java @@ -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 - *

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

- * @return Updated contact instance - *

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