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.jcore.contact.Contact;
20 import org.mxchange.jcore.contact.Gender;
21 import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
22 import org.mxchange.jcore.manager.Manageable;
26 * @author Roland Haeder
28 public interface ManageableContact extends Manageable {
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 ();
121 * Getter for column count
123 * @return Column count
125 public int getColumnCount ();
130 public void doListContacts ();
133 * Getter for column name at given index.
135 * @param columnIndex Column index
136 * @return Database column name
138 public String getColumnName (final int columnIndex);
141 * Getter for translated column name at given index.
143 * @param columnIndex Column index
144 * @return Human-readable column name
146 public String getTranslatedColumnName (int columnIndex);
149 * Somewhat "getter" for value from given row and column index
151 * @param rowIndex Row index
152 * @param columnIndex Column index
153 * @return Value from given row/column
155 public Object getValueFromRowColumn (final int rowIndex, final int columnIndex);
158 * Adds given contact to address book
160 * @param contact Contact being added
161 * @todo Add check for book size
163 public void registerContact (final Contact contact);
166 * Adds given Contact instance to list
168 * @param contact Contact instance to add
169 * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If the contact is already added
171 public void addContact (final Contact contact) throws ContactAlreadyAddedException;
174 * Let the user add a new other address
176 public void doAddOtherAddress ();
179 * The user can change address data, like street, ZIP code, city and country
180 * of given Contact instance.
182 * @param contact Instance to change data
184 public void doChangeAddressData (final Contact contact);
187 * The user can change name data, like gender, surname, family name and
188 * company name (if business contact).
190 * @param contact Instance to change data
192 public void doChangeNameData (final Contact contact);
195 * Let the user change other address
197 public void doChangeOtherAddress ();
200 * The user can change other data, like phone numbers or comments.
202 * @param contact Instance to change data
204 public void doChangeOtherData (final Contact contact);
207 * Let the user change own data
209 public void doChangeOwnData ();
212 * Let the user delete other address
214 public void doDeleteOtherAddress ();
217 * Asks user for own data
218 * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If own contact is already added
220 public void doEnterOwnData () throws ContactAlreadyAddedException;
223 * Searches address book for a contact
225 public void doSearchContacts ();
228 * Checks whether own contact is already added by checking all entries for
231 * @return Whether own contact is already added
233 public boolean isOwnContactAdded ();
238 * @return size of contact "book"