From bc8837a28baeea2d4081d67cfe549c02bc42f7a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 4 Sep 2017 00:51:03 +0200 Subject: [PATCH] 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../jcontacts/contact/AdminContactSessionBeanRemote.java | 5 ++++- .../mxchange/jcontacts/contact/ContactSessionBeanRemote.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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. -- 2.39.5