/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2024 Free Software Foundation
*
* 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
import java.io.Serializable;
import java.util.List;
import javax.ejb.Remote;
+import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
/**
* A remote interface for general contact purposes
@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);
-
- /**
- * Checks if the given contact can be found by checking the whole list.
- * <p>
- * @param contact Contact instance to check
- * <p>
- * @return Whether the found instance or null
- */
- Contact lookupContact (final Contact contact);
-
/**
* Updates given contact data
* <p>
- * @param contact Contact data to update
- * @param isMobileUnlinked Whether a mobile entry has been unlinked in
- * contact instance
+ * @param contact Contact data to update
+ * @param isMobileUnlinked Whether a mobile entry has been unlinked in
+ * contact instance
* @param isLandlineUnlinked Whether a land-line entry has been unlinked in
- * contact instance
- * @param isFaxUnlinked Whether a fax entry has been unlinked in contact
- * instance
+ * contact instance
+ * @param isFaxUnlinked Whether a fax entry has been unlinked in
+ * contact instance
* <p>
* @return Updated contact instance
+ * <p>
+ * @throws ContactNotFoundException If the given contact is not found
*/
- Contact updateContactData (final Contact contact, final boolean isMobileUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked);
+ Contact updateContactData (final Contact contact, final boolean isMobileUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked) throws ContactNotFoundException;
/**
* Updates given contact in database. Please note that the id number must be
* @param contact Contact to update
* <p>
* @return Updated contact instance
+ * <p>
+ * @throws ContactNotFoundException If the given contact is not found
*/
- Contact updateContactData (final Contact contact);
+ Contact updateContactData (final Contact contact) throws ContactNotFoundException;
/**
* Returns a list of all found contacts
* <p>
* @return A list of call contacts
*/
- List<Contact> allContacts ();
-
- /**
- * Returns a list of all registered email addresses.
- * <p>
- * @return A list of all email addresses
- */
- List<String> allEmailAddresses ();
+ List<Contact> fetchAllContacts ();
}