2 * Copyright (C) 2015 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.addressbook.beans.addressbook;
19 import java.io.Serializable;
20 import java.util.List;
21 import org.mxchange.addressbook.model.addressbook.Addressbook;
24 * An interface for user beans
26 * @author Roland Haeder<roland@mxchange.org>
28 public interface AddressbookWebController extends Serializable {
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.
34 * @return Whether the user has created at least one addressbook
36 public boolean hasCreatedAddressbooks ();
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.
42 public void addAddressbook ();
45 * Getter for address book name
47 * @return Address book name
49 public String getAddressbookName ();
52 * Setter for address book name
54 * @param addressbookName Address book name
56 public void setAddressbookName (final String addressbookName);
59 * Checks if the given address book name is already used by the user.
61 * @param addressbookName Address book name to check
63 * @return Whether the name has already been used by the user
65 public boolean isAddressbookNameUsed (final String addressbookName);
68 * Returns all address books with this user
70 * @return A list of all address books by this user
72 public List<Addressbook> allAddressbooks ();