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.manager.contact;
19 import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
20 import org.mxchange.jcore.contact.Contact;
21 import org.mxchange.jcore.contact.Gender;
22 import org.mxchange.jcore.manager.database.ManageableDatabase;
26 * @author Roland Haeder
28 public interface ManageableAddressbookContact extends ManageableDatabase {
30 * Allows the user to enter own cellphone number.
32 * @return Cellphone number
34 public String enterOwnCellNumber ();
37 * Allows the user to enter own city name.
41 public String enterOwnCity ();
44 * Allows the user to enter comment for own entry.
48 public String enterOwnComment ();
51 * Allows the user to enter own company name.
53 * @return Company name
55 public String enterOwnCompanyName ();
58 * Allows the user to enter own country code.
60 * @return Country code
62 public String enterOwnCountryCode ();
65 * Allows the user to enter own email address.
67 * @return Email address
69 public String enterOwnEmailAddress ();
72 * Allows the user to enter own family name.
76 public String enterOwnFamilyName ();
79 * Allows the user to enter own fax number.
83 public String enterOwnFaxNumber ();
86 * Allows the user to enter own gender.
90 public Gender enterOwnGender ();
93 * Allows the user to enter own phone number.
95 * @return Phone number
97 public String enterOwnPhoneNumber ();
100 * Allows the user to enter own street and house number.
102 * @return Street and house number
104 public String enterOwnStreet ();
107 * Allows the user to enter own surname.
111 public String enterOwnSurname ();
114 * Allows the user to enter own ZIP code.
118 public int enterOwnZipCode ();
123 public void doListContacts ();
126 * Adds given contact to address book
128 * @param contact Contact being added
129 * @todo Add check for book size
131 public void registerContact (final Contact contact);
134 * Adds given Contact instance to list
136 * @param contact Contact instance to add
137 * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If the contact is already added
139 public void addContact (final Contact contact) throws ContactAlreadyAddedException;
142 * Let the user add a new other address
144 public void doAddOtherAddress ();
147 * The user can change address data, like street, ZIP code, city and country
148 * of given Contact instance.
150 * @param contact Instance to change data
152 public void doChangeAddressData (final Contact contact);
155 * The user can change name data, like gender, surname, family name and
156 * company name (if business contact).
158 * @param contact Instance to change data
160 public void doChangeNameData (final Contact contact);
163 * Let the user change other address
165 public void doChangeOtherAddress ();
168 * The user can change other data, like phone numbers or comments.
170 * @param contact Instance to change data
172 public void doChangeOtherData (final Contact contact);
175 * Let the user change own data
177 public void doChangeOwnData ();
180 * Let the user delete other address
182 public void doDeleteOtherAddress ();
185 * Asks user for own data
186 * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If own contact is already added
188 public void doEnterOwnData () throws ContactAlreadyAddedException;
191 * Searches address book for a contact
193 public void doSearchContacts ();
196 * Checks whether own contact is already added by checking all entries for
199 * @return Whether own contact is already added
201 public boolean isOwnContactAdded ();