]> 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 2ed123c2ee6592afab633406d6802feb896c0f7f..cc22934f816c48a687467cedf39feed060adb7bb 100644 (file)
  */
 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.
         *
@@ -140,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
         *
@@ -156,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
@@ -169,18 +180,16 @@ public interface ManageableContact extends Manageable {
         * 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
@@ -191,9 +200,8 @@ public interface ManageableContact extends Manageable {
         * 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
@@ -207,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