*/
package org.mxchange.addressbook.manager.contact;
-import java.util.List;
-import org.mxchange.addressbook.client.Client;
import org.mxchange.addressbook.contact.Contact;
import org.mxchange.addressbook.contact.Gender;
-import org.mxchange.addressbook.manager.Manageable;
+import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
+import org.mxchange.jcore.manager.Manageable;
/**
*
* @author Roland Haeder
*/
public interface ManageableContact extends Manageable {
-
- /**
- * Shuts down this contact manager
- */
- public void doShutdown ();
-
/**
* Allows the user to enter own cellphone number.
*
* Getter for column name at given index.
*
* @param columnIndex Column index
- * @return Human-readable column name
+ * @return Database column name
*/
public String getColumnName (final int columnIndex);
+ /**
+ * Getter for translated column name at given index.
+ *
+ * @param columnIndex Column index
+ * @return Human-readable column name
+ */
+ public String getTranslatedColumnName (int columnIndex);
+
+ /**
+ * Somewhat "getter" for value from given row and column index
+ *
+ * @param rowIndex Row index
+ * @param columnIndex Column index
+ * @return Value from given row/column
+ */
+ public Object getValueFromRowColumn (final int rowIndex, final int columnIndex);
+
/**
* Adds given contact to address book
*
* Adds given Contact instance to list
*
* @param contact Contact instance to add
+ * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If the contact is already added
*/
- public void addContact (final Contact contact);
+ public void addContact (final Contact contact) throws ContactAlreadyAddedException;
/**
* Let the user add a new other address
* of given Contact instance.
*
* @param contact Instance to change data
- * @param client Client instance to call back
*/
- public void doChangeAddressData (final Contact contact, final Client client);
+ public void doChangeAddressData (final Contact contact);
/**
* The user can change name data, like gender, surname, family name and
* company name (if business contact).
*
* @param contact Instance to change data
- * @param client Client instance to call back
*/
- public void doChangeNameData (final Contact contact, final Client client);
+ public void doChangeNameData (final Contact contact);
/**
* Let the user change other address
* The user can change other data, like phone numbers or comments.
*
* @param contact Instance to change data
- * @param client Client instance to call back
*/
- public void doChangeOtherData (final Contact contact, final Client client);
+ public void doChangeOtherData (final Contact contact);
/**
* Let the user change own data
/**
* Asks user for own data
+ * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If own contact is already added
*/
- public void doEnterOwnData ();
-
- /**
- * Getter for whole list
- *
- * @return List of all contacts
- */
- public List<Contact> getList ();
+ public void doEnterOwnData () throws ContactAlreadyAddedException;
/**
* Searches address book for a contact