]> git.mxchange.org Git - addressbook-lib.git/blob - src/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBeanRemote.java
Continued:
[addressbook-lib.git] / src / org / mxchange / addressbook / model / shared / SharedAddressbooksSessionBeanRemote.java
1 /*
2  * Copyright (C) 2015 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.addressbook.model.shared;
18
19 import java.io.Serializable;
20 import javax.ejb.Remote;
21 import org.mxchange.addressbook.exceptions.UserAlreadySharingAddressbookException;
22 import org.mxchange.addressbook.model.addressbook.Addressbook;
23 import org.mxchange.addressbook.model.addressbook.shared.ShareableAddressbook;
24 import org.mxchange.jusercore.model.user.User;
25
26 /**
27  * A remote interface for sharing address books
28  * <p>
29  * @author Roland Haeder
30  */
31 @Remote
32 public interface SharedAddressbooksSessionBeanRemote extends Serializable {
33
34         /**
35          * Starts an address book share between currently logged-in user and
36          * assigned user for current address book.
37          * <p>
38          * @param sharee User sharee instance
39          * @param addressbook Address book instance
40          * @return Updated share instance
41          * @throws
42          * org.mxchange.addressbook.exceptions.UserAlreadySharingAddressbookException
43          * When the user is already sharing the address book
44          */
45         ShareableAddressbook startSharing (final User sharee, final Addressbook addressbook) throws UserAlreadySharingAddressbookException;
46
47         /**
48          * Checks if the given user is sharing address books with others
49          * <p>
50          * @param user User instance
51          * @return Whether the user is sharing address books
52          */
53         Boolean isUserSharingAddressbooks (final User user);
54
55 }