From: Roland Häder Date: Sun, 3 Sep 2017 22:51:03 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bc8837a28baeea2d4081d67cfe549c02bc42f7a4;p=jcontacts-lib.git Continued: - deleteContactData() does now throw ContactNotFoundException, if the given contact was not found but method was invoked - renamed getAllContacts() -> allContacts() as this is no pure getter - renamed getEmailAddressList() -> allEmailAddresses() to follow naming convention: no getter and no need for "List" suffix, "all" prefix says it Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontacts/contact/AdminContactSessionBeanRemote.java b/src/org/mxchange/jcontacts/contact/AdminContactSessionBeanRemote.java index cf3b0ba..77d15ee 100644 --- a/src/org/mxchange/jcontacts/contact/AdminContactSessionBeanRemote.java +++ b/src/org/mxchange/jcontacts/contact/AdminContactSessionBeanRemote.java @@ -19,6 +19,7 @@ package org.mxchange.jcontacts.contact; import java.io.Serializable; import javax.ejb.Remote; import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException; +import org.mxchange.jcontacts.exceptions.ContactNotFoundException; /** * A remote interface for administrative contact purposes @@ -32,8 +33,10 @@ public interface AdminContactSessionBeanRemote extends Serializable { * Deletes given contact instance *

* @param contact Contact instance being deleted + *

+ * @throws ContactNotFoundException If the contact is not found */ - void deleteContactData (final Contact contact); + void deleteContactData (final Contact contact) throws ContactNotFoundException; /** * Adds (persists) given contact instance, if not found. If successfull, the diff --git a/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java b/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java index 78431f7..6b815e0 100644 --- a/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java +++ b/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java @@ -80,14 +80,14 @@ public interface ContactSessionBeanRemote extends Serializable { *

* @return A list of call contacts */ - List getAllContacts (); + List allContacts (); /** * Returns a list of all registered email addresses. *

* @return A list of all email addresses */ - List getEmailAddressList (); + List allEmailAddresses (); /** * Returns a contact instance which has the given id number.