2 * Copyright (C) 2016 Roland Haeder
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.
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.
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/>.
17 package org.mxchange.jcontacts.phone;
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;
30 * A remote interface for administrative purposes around contact's phone numbers
33 * @author Roland Haeder<roland@mxchange.org>
36 public interface AdminContactsPhoneSessionBeanRemote extends Serializable {
39 * Unlinks fax data from given contact and returns the updated (detached?)
42 * @param contact Contact to unlink mobile instance
43 * @param faxNumber Fax number being unlinked
45 * @return Updated contact instance
47 * @throws FaxNumberNotLinkedException If a mobile instance is not linked
48 * (null) with this contact
50 Contact unlinkFaxDataFromContact (final Contact contact, final DialableFaxNumber faxNumber) throws FaxNumberNotLinkedException;
53 * Unlinks land-line data from given contact and returns the updated
54 * (detached?) version.
56 * @param contact Contact to unlink mobile instance
57 * @param landLineNumber Land-line number being unlinked
59 * @return Updated contact instance
61 * @throws LandLineNumberNotLinkedException If a mobile instance is not
62 * linked (null) with this contact
64 Contact unlinkLandLineDataFromContact (final Contact contact, final DialableLandLineNumber landLineNumber) throws LandLineNumberNotLinkedException;
67 * Unlinks mobile data from given contact and returns the updated
68 * (detached?) version.
70 * @param contact Contact to unlink mobile instance
71 * @param mobileNumber Mobile number being unlinked
73 * @return Updated contact instance
75 * @throws MobileNumberNotLinkedException If a mobile instance is not linked
76 * (null) with this contact
78 Contact unlinkMobileDataFromContact (final Contact contact, final DialableMobileNumber mobileNumber) throws MobileNumberNotLinkedException;