]> git.mxchange.org Git - jcontacts-lib.git/blob - src/org/mxchange/jcontacts/phone/AdminContactsPhoneSessionBeanRemote.java
Contined a bit:
[jcontacts-lib.git] / src / org / mxchange / jcontacts / phone / AdminContactsPhoneSessionBeanRemote.java
1 /*
2  * Copyright (C) 2016 Roland Haeder
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.phone;
18
19 import java.io.Serializable;
20 import javax.ejb.Remote;
21 import org.mxchange.jcontacts.contact.Contact;
22 import org.mxchange.jphone.exceptions.FaxNumberNotLinkedException;
23 import org.mxchange.jphone.exceptions.LandLineNumberNotLinkedException;
24 import org.mxchange.jphone.exceptions.MobileNumberNotLinkedException;
25 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
26 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
27 import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
28
29 /**
30  * A remote interface for administrative purposes around contact's phone numbers
31  * (any type).
32  * <p>
33  * @author Roland Haeder<roland@mxchange.org>
34  */
35 @Remote
36 public interface AdminContactsPhoneSessionBeanRemote extends Serializable {
37
38         /**
39          * Unlinks fax data from given contact and returns the updated (detached?)
40          * version.
41          * <p>
42          * @param contact Contact to unlink mobile instance
43          * @param faxNumber Fax number being unlinked
44          * <p>
45          * @return Updated contact instance
46          * <p>
47          * @throws FaxNumberNotLinkedException If a mobile instance is not linked
48          * (null) with this contact
49          */
50         Contact unlinkFaxDataFromContact (final Contact contact, final DialableFaxNumber faxNumber) throws FaxNumberNotLinkedException;
51
52         /**
53          * Unlinks land-line data from given contact and returns the updated
54          * (detached?) version.
55          * <p>
56          * @param contact Contact to unlink mobile instance
57          * @param landLineNumber Land-line number being unlinked
58          * <p>
59          * @return Updated contact instance
60          * <p>
61          * @throws LandLineNumberNotLinkedException If a mobile instance is not
62          * linked (null) with this contact
63          */
64         Contact unlinkLandLineDataFromContact (final Contact contact, final DialableLandLineNumber landLineNumber) throws LandLineNumberNotLinkedException;
65
66         /**
67          * Unlinks mobile data from given contact and returns the updated
68          * (detached?) version.
69          * <p>
70          * @param contact Contact to unlink mobile instance
71          * @param mobileNumber Mobile number being unlinked
72          * <p>
73          * @return Updated contact instance
74          * <p>
75          * @throws MobileNumberNotLinkedException If a mobile instance is not linked
76          * (null) with this contact
77          */
78         Contact unlinkMobileDataFromContact (final Contact contact, final DialableMobileNumber mobileNumber) throws MobileNumberNotLinkedException;
79
80 }