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.contact.Contact;
20 import org.mxchange.addressbook.contact.Gender;
21 import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
22 import org.mxchange.addressbook.manager.Manageable;
26 * @author Roland Haeder
28 public interface ManageableContact extends Manageable {
31 * Shuts down this contact manager
33 public void doShutdown ();
36 * Allows the user to enter own cellphone number.
38 * @return Cellphone number
40 public String enterOwnCellNumber ();
43 * Allows the user to enter own city name.
47 public String enterOwnCity ();
50 * Allows the user to enter comment for own entry.
54 public String enterOwnComment ();
57 * Allows the user to enter own company name.
59 * @return Company name
61 public String enterOwnCompanyName ();
64 * Allows the user to enter own country code.
66 * @return Country code
68 public String enterOwnCountryCode ();
71 * Allows the user to enter own email address.
73 * @return Email address
75 public String enterOwnEmailAddress ();
78 * Allows the user to enter own family name.
82 public String enterOwnFamilyName ();
85 * Allows the user to enter own fax number.
89 public String enterOwnFaxNumber ();
92 * Allows the user to enter own gender.
96 public Gender enterOwnGender ();
99 * Allows the user to enter own phone number.
101 * @return Phone number
103 public String enterOwnPhoneNumber ();
106 * Allows the user to enter own street and house number.
108 * @return Street and house number
110 public String enterOwnStreet ();
113 * Allows the user to enter own surname.
117 public String enterOwnSurname ();
120 * Allows the user to enter own ZIP code.
124 public int enterOwnZipCode ();
127 * Getter for column count
129 * @return Column count
131 public int getColumnCount ();
136 public void doListContacts ();
139 * Getter for column name at given index.
141 * @param columnIndex Column index
142 * @return Human-readable column name
144 public String getColumnName (final int columnIndex);
147 * Adds given contact to address book
149 * @param contact Contact being added
150 * @todo Add check for book size
152 public void registerContact (final Contact contact);
155 * Adds given Contact instance to list
157 * @param contact Contact instance to add
158 * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If the contact is already added
160 public void addContact (final Contact contact) throws ContactAlreadyAddedException;
163 * Let the user add a new other address
165 public void doAddOtherAddress ();
168 * The user can change address data, like street, ZIP code, city and country
169 * of given Contact instance.
171 * @param contact Instance to change data
173 public void doChangeAddressData (final Contact contact);
176 * The user can change name data, like gender, surname, family name and
177 * company name (if business contact).
179 * @param contact Instance to change data
181 public void doChangeNameData (final Contact contact);
184 * Let the user change other address
186 public void doChangeOtherAddress ();
189 * The user can change other data, like phone numbers or comments.
191 * @param contact Instance to change data
193 public void doChangeOtherData (final Contact contact);
196 * Let the user change own data
198 public void doChangeOwnData ();
201 * Let the user delete other address
203 public void doDeleteOtherAddress ();
206 * Asks user for own data
207 * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If own contact is already added
209 public void doEnterOwnData () throws ContactAlreadyAddedException;
212 * Searches address book for a contact
214 public void doSearchContacts ();
217 * Checks whether own contact is already added by checking all entries for
220 * @return Whether own contact is already added
222 public boolean isOwnContactAdded ();
227 * @return size of contact "book"