]> git.mxchange.org Git - jcontacts-lib.git/blob - src/org/mxchange/jcontacts/model/contact/ContactSessionBeanRemote.java
Changed copyright notice to the FSF, so after my death they will continue my
[jcontacts-lib.git] / src / org / mxchange / jcontacts / model / contact / ContactSessionBeanRemote.java
1 /*
2  * Copyright (C) 2016, 2017 Free Software Foundation
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.jcontacts.model.contact;
18
19 import java.io.Serializable;
20 import java.util.List;
21 import javax.ejb.Remote;
22
23 /**
24  * A remote interface for general contact purposes
25  * <p>
26  * @author Roland Häder<roland@mxchange.org>
27  */
28 @Remote
29 public interface ContactSessionBeanRemote extends Serializable {
30
31         /**
32          * Checks if the given contact can be found by checking the whole list.
33          * <p>
34          * @param contact Contact instance to check
35          * <p>
36          * @return Whether the found instance or null
37          */
38         Contact lookupContact (final Contact contact);
39
40         /**
41          * Updates given contact data
42          * <p>
43          * @param contact Contact data to update
44          * @param isMobileUnlinked Whether a mobile entry has been unlinked in
45          * contact instance
46          * @param isLandlineUnlinked Whether a land-line entry has been unlinked in
47          * contact instance
48          * @param isFaxUnlinked Whether a fax entry has been unlinked in contact
49          * instance
50          * <p>
51          * @return Updated contact instance
52          */
53         Contact updateContactData (final Contact contact, final boolean isMobileUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked);
54
55         /**
56          * Updates given contact in database. Please note that the id number must be
57          * set. This method should also make sure that mobile, land-line and fix
58          * numbers are updated, too.
59          * <p>
60          * @param contact Contact to update
61          * <p>
62          * @return Updated contact instance
63          */
64         Contact updateContactData (final Contact contact);
65
66         /**
67          * Returns a list of all found contacts
68          * <p>
69          * @return A list of call contacts
70          */
71         List<Contact> allContacts ();
72
73         /**
74          * Returns a list of all registered email addresses.
75          * <p>
76          * @return A list of all email addresses
77          */
78         List<String> allEmailAddresses ();
79
80 }