]> git.mxchange.org Git - addressbook-war.git/blob - src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java
Continued:
[addressbook-war.git] / src / java / org / mxchange / addressbook / beans / addressbook / AddressbookWebController.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.beans.addressbook;
18
19 import java.io.Serializable;
20 import java.util.List;
21 import org.mxchange.addressbook.model.addressbook.Addressbook;
22
23 /**
24  * An interface for user beans
25  * <p>
26  * @author Roland Haeder<roland@mxchange.org>
27  */
28 public interface AddressbookWebController extends Serializable {
29
30         /**
31          * Checks whether the user has created addressbooks. For this method to work
32          * it is vital that the user is logged into his/her account.
33          * <p>
34          * @return Whether the user has created at least one addressbook
35          */
36         public boolean hasCreatedAddressbooks ();
37
38         /**
39          * Creates a new address book with a name. For this method to work it is
40          * vital that the user is logged into his/her account.
41          */
42         public void addAddressbook ();
43
44         /**
45          * Getter for address book name
46          * <p>
47          * @return Address book name
48          */
49         public String getAddressbookName ();
50
51         /**
52          * Setter for address book name
53          * <p>
54          * @param addressbookName Address book name
55          */
56         public void setAddressbookName (final String addressbookName);
57
58         /**
59          * Checks if the given address book name is already used by the user.
60          * <p>
61          * @param addressbookName Address book name to check
62          * <p>
63          * @return Whether the name has already been used by the user
64          */
65         public boolean isAddressbookNameUsed (final String addressbookName);
66
67         /**
68          * Returns all address books with this user
69          * <p>
70          * @return A list of all address books by this user
71          */
72         public List<Addressbook> allAddressbooks ();
73 }