2 * Copyright (C) 2016 Roland Haeder<roland@mxchange.org>
\r
4 * This program is free software: you can redistribute it and/or modify
\r
5 * it under the terms of the GNU General Public License as published by
\r
6 * the Free Software Foundation, either version 3 of the License, or
\r
7 * (at your option) any later version.
\r
9 * This program is distributed in the hope that it will be useful,
\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 * GNU General Public License for more details.
\r
14 * You should have received a copy of the GNU General Public License
\r
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
\r
17 package org.mxchange.jcontacts.contact;
\r
19 import java.io.Serializable;
\r
20 import java.util.List;
\r
21 import javax.ejb.Remote;
\r
22 import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
\r
25 * A remote interface for general contact purposes
\r
27 * @author Roland Haeder<roland@mxchange.org>
\r
30 public interface ContactSessionBeanRemote extends Serializable {
\r
33 * Updates given contact data
\r
35 * @param contact Contact data to update
\r
36 * @param isCellphoneUnlinked Whether a cellphone entry has been unlinked in contact instance
\r
37 * @param isLandlineUnlinked Whether a land-line entry has been unlinked in contact instance
\r
38 * @param isFaxUnlinked Whether a fax entry has been unlinked in contact instance
\r
40 * @return Updated contact instance
\r
42 Contact updateContactData (final Contact contact, final boolean isCellphoneUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked);
\r
45 * Returns a list of all found contacts
\r
47 * @return A list of call contacts
\r
49 List<Contact> getAllContacts ();
\r
52 * Returns a list of all registered email addresses.
\r
54 * @return A list of all email addresses
\r
56 List<String> getEmailAddressList ();
\r
59 * Returns a contact instance which has the given id number.
\r
61 * @param contactId Contact id
\r
63 * @return Contact instance
\r
65 * @throws ContactNotFoundException If the contact was not found
\r
67 Contact findContactById (final Long contactId) throws ContactNotFoundException;
\r