]> git.mxchange.org Git - addressbook-swing.git/blobdiff - Addressbook/src/org/mxchange/addressbook/manager/contact/ManageableContact.java
Moved a lot classes and interfaces (generalized) to new jcore project + added a few...
[addressbook-swing.git] / Addressbook / src / org / mxchange / addressbook / manager / contact / ManageableContact.java
index 6c4ff93d4ebface32e0e22fbc5b2d636bcc068ab..cc22934f816c48a687467cedf39feed060adb7bb 100644 (file)
  */
 package org.mxchange.addressbook.manager.contact;
 
-import java.util.List;
 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.
         *
@@ -139,10 +133,27 @@ public interface ManageableContact extends Manageable {
         * 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
         *
@@ -155,8 +166,9 @@ public interface ManageableContact extends Manageable {
         * 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
@@ -203,15 +215,9 @@ public interface ManageableContact extends Manageable {
 
        /**
         * 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