]> git.mxchange.org Git - jcontacts-lib.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Fri, 13 May 2016 09:37:33 +0000 (11:37 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 13 May 2016 09:44:43 +0000 (11:44 +0200)
- added business method isEmailAddressRegistered()
- added business method findContactByEmailAddress()

src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java

index f0c93eb8e866182100337a0528099f21b571be61..d16b40ef05d7d64bba48c728d7e83f4a2d75a04b 100644 (file)
@@ -30,6 +30,17 @@ import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
 @Remote
 public interface ContactSessionBeanRemote extends Serializable {
 
+       /**
+        * Checks whether the given email address is already registered. The email
+        * address should be validated by EmailAddressValidator before calling this
+        * method.
+        * <p>
+        * @param emailAddress Email address to check
+        * <p>
+        * @return Whether the email address is already registered
+        */
+       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
@@ -104,4 +115,15 @@ public interface ContactSessionBeanRemote extends Serializable {
         */
        Contact findContactById (final Long contactId) throws ContactNotFoundException;
 
+       /**
+        * Returns a contact instance which has the given email address.
+        * <p>
+        * @param emailAddress Email address
+        * <p>
+        * @return Contact instance
+        * <p>
+        * @throws ContactNotFoundException If the contact was not found
+        */
+       Contact findContactByEmailAddress (final String emailAddress) throws ContactNotFoundException;
+
 }