public interface ManageableContactAddressbook extends Manageable {
/**
- * Allows the user to enter own cellphone number.
+ * Adds given Contact instance to list
* <p>
- * @return Cellphone number
+ * @param contact Contact instance to add
+ * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If the contact is already added
*/
- public String enterOwnCellNumber ();
+ public void addContact (final Contact contact) throws ContactAlreadyAddedException;
/**
- * Allows the user to enter own city name.
- * <p>
- * @return City name
+ * Let the user add a new other address
*/
- public String enterOwnCity ();
+ public void doAddOtherAddress ();
/**
- * Allows the user to enter comment for own entry.
+ * The user can change address data, like street, ZIP code, city and country
+ * of given Contact instance.
* <p>
- * @return Comment
+ * @param contact Instance to change data
*/
- public String enterOwnComment ();
+ public void doChangeAddressData (final Contact contact);
/**
- * Allows the user to enter own company name.
+ * The user can change name data, like gender, surname, family name and
+ * company name (if business contact).
* <p>
- * @return Company name
+ * @param contact Instance to change data
*/
- public String enterOwnCompanyName ();
+ public void doChangeNameData (final Contact contact);
/**
- * Allows the user to enter own country code.
- * <p>
- * @return Country code
+ * Let the user change other address
*/
- public String enterOwnCountryCode ();
+ public void doChangeOtherAddress ();
/**
- * Allows the user to enter own email address.
+ * The user can change other data, like phone numbers or comments.
* <p>
- * @return Email address
+ * @param contact Instance to change data
*/
- public String enterOwnEmailAddress ();
+ public void doChangeOtherData (final Contact contact);
/**
- * Allows the user to enter own family name.
+ * Let the user change own data
* <p>
- * @return Family name
+ * @throws java.sql.SQLException If an SQL error occurs
+ * @throws java.io.IOException If an IO error occurs
+ * @throws java.lang.NoSuchMethodException If a method cannot be found
+ * @throws java.lang.IllegalAccessException If a method is not accessible
+ * @throws java.lang.reflect.InvocationTargetException Any other problems?
*/
- public String enterOwnFamilyName ();
+ public void doChangeOwnData () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
/**
- * Allows the user to enter own fax number.
- * <p>
- * @return Fax number
+ * Let the user delete other address
*/
- public String enterOwnFaxNumber ();
+ public void doDeleteOtherAddress ();
/**
- * Allows the user to enter own gender.
+ * Asks user for own data
* <p>
- * @return Gender
+ * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException
+ * If own contact is already added
+ * @throws java.io.IOException If an IO error was found
*/
- public Gender enterOwnGender ();
+ public void doEnterOwnData () throws ContactAlreadyAddedException, IOException;
/**
- * Allows the user to enter own phone number.
- * <p>
- * @return Phone number
+ * List all contacts
*/
- public String enterOwnPhoneNumber ();
+ public void doListContacts ();
/**
- * Allows the user to enter own street and house number.
- * <p>
- * @return Street and house number
+ * Searches address book for a contact
*/
- public String enterOwnStreet ();
+ public void doSearchContacts ();
/**
- * Allows the user to enter own surname.
+ * Allows the user to enter own cellphone number.
* <p>
- * @return Surname
+ * @return Cellphone number
*/
- public String enterOwnFirstName ();
+ public String enterOwnCellNumber ();
/**
- * Allows the user to enter own ZIP code.
+ * Allows the user to enter own city name.
* <p>
- * @return ZIP code
+ * @return City name
*/
- public int enterOwnZipCode ();
+ public String enterOwnCity ();
/**
- * List all contacts
+ * Allows the user to enter comment for own entry.
+ * <p>
+ * @return Comment
*/
- public void doListContacts ();
+ public String enterOwnComment ();
/**
- * Adds given contact to address book
+ * Allows the user to enter own company name.
* <p>
- * @param contact Contact being added TODO Add check for book size
+ * @return Company name
*/
- public void registerContact (final Contact contact);
+ public String enterOwnCompanyName ();
/**
- * Adds given Contact instance to list
+ * Allows the user to enter own country code.
* <p>
- * @param contact Contact instance to add
- * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException
- * If the contact is already added
+ * @return Country code
*/
- public void addContact (final Contact contact) throws ContactAlreadyAddedException;
+ public String enterOwnCountryCode ();
/**
- * Let the user add a new other address
+ * Allows the user to enter own email address.
+ * <p>
+ * @return Email address
*/
- public void doAddOtherAddress ();
+ public String enterOwnEmailAddress ();
/**
- * The user can change address data, like street, ZIP code, city and country
- * of given Contact instance.
+ * Allows the user to enter own family name.
* <p>
- * @param contact Instance to change data
+ * @return Family name
*/
- public void doChangeAddressData (final Contact contact);
+ public String enterOwnFamilyName ();
/**
- * The user can change name data, like gender, surname, family name and
- * company name (if business contact).
+ * Allows the user to enter own fax number.
* <p>
- * @param contact Instance to change data
+ * @return Fax number
*/
- public void doChangeNameData (final Contact contact);
+ public String enterOwnFaxNumber ();
/**
- * Let the user change other address
+ * Allows the user to enter own surname.
+ * <p>
+ * @return Surname
*/
- public void doChangeOtherAddress ();
+ public String enterOwnFirstName ();
/**
- * The user can change other data, like phone numbers or comments.
+ * Allows the user to enter own gender.
* <p>
- * @param contact Instance to change data
+ * @return Gender
*/
- public void doChangeOtherData (final Contact contact);
+ public Gender enterOwnGender ();
/**
- * Let the user change own data
+ * Allows the user to enter own phone number.
* <p>
- * @throws java.sql.SQLException If an SQL error occurs
- * @throws java.io.IOException If an IO error occurs
- * @throws java.lang.NoSuchMethodException If a method cannot be found
- * @throws java.lang.IllegalAccessException If a method is not accessible
- * @throws java.lang.reflect.InvocationTargetException Any other problems?
+ * @return Phone number
*/
- public void doChangeOwnData () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+ public String enterOwnPhoneNumber ();
/**
- * Let the user delete other address
+ * Allows the user to enter own street and house number.
+ * <p>
+ * @return Street and house number
*/
- public void doDeleteOtherAddress ();
+ public String enterOwnStreet ();
/**
- * Asks user for own data
+ * Allows the user to enter own ZIP code.
* <p>
- * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException
- * If own contact is already added
- * @throws java.io.IOException If an IO error was found
+ * @return ZIP code
*/
- public void doEnterOwnData () throws ContactAlreadyAddedException, IOException;
+ public int enterOwnZipCode ();
/**
- * Searches address book for a contact
+ * Getter for column count
+ * <p>
+ * @return Column count TODO: This is needed for TableModel in Swing
*/
- public void doSearchContacts ();
+ public int getColumnCount ();
/**
- * Checks whether own contact is already added by checking all entries for
- * isOwnContact flag
+ * Getter for column name at given index.
* <p>
- * @return Whether own contact is already added
- * @throws java.io.IOException If an IO error occurs
+ * @param columnIndex Column index
+ * @return Database column name TODO: This is needed for TableModel in Swing
*/
- public boolean isOwnContactAdded () throws IOException;
+ public String getColumnName (final int columnIndex);
/**
* Getter for translated column name at given index.
* @param columnIndex Column index
* @return Value from given row/column
* @throws java.lang.NoSuchMethodException If the method was not found
- * @throws java.lang.IllegalAccessException If the accessed method was not
- * public
+ * @throws java.lang.IllegalAccessException If the accessed method was not public
* @throws java.lang.reflect.InvocationTargetException Something else
* happened? TODO: This is needed for TableModel in Swing
*/
public Object getValueFromRowColumn (final int rowIndex, final int columnIndex) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException;
/**
- * Getter for column name at given index.
+ * Checks whether own contact is already added by checking all entries for
+ * isOwnContact flag
* <p>
- * @param columnIndex Column index
- * @return Database column name TODO: This is needed for TableModel in Swing
+ * @return Whether own contact is already added
+ * @throws java.io.IOException If an IO error occurs
*/
- public String getColumnName (final int columnIndex);
+ public boolean isOwnContactAdded () throws IOException;
/**
- * Getter for column count
+ * Adds given contact to address book
* <p>
- * @return Column count TODO: This is needed for TableModel in Swing
+ * @param contact Contact being added TODO Add check for book size
*/
- public int getColumnCount ();
+ public void registerContact (final Contact contact);
}