]> 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 520f4abaaa8bca000cf5e8700a3631dda17db4fd..cc22934f816c48a687467cedf39feed060adb7bb 100644 (file)
-/*\r
- * Copyright (C) 2015 Roland Haeder\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package org.mxchange.addressbook.manager.contact;\r
-\r
-import java.util.List;\r
-import org.mxchange.addressbook.client.Client;\r
-import org.mxchange.addressbook.contact.Contact;\r
-import org.mxchange.addressbook.manager.Manageable;\r
-\r
-/**\r
- *\r
- * @author Roland Haeder\r
- */\r
-public interface ManageableContact extends Manageable {\r
-\r
-    /**\r
-     * Shuts down this contact manager\r
-     */\r
-    public void doShutdown ();\r
-\r
-    /**\r
-     * List all contacts\r
-     */\r
-    public void listContacts ();\r
-\r
-    /**\r
-     * Adds given contact to address book\r
-     *\r
-     * @param contact Contact being added\r
-     * @todo Add check for book size\r
-     */\r
-    public void registerContact (final Contact contact);\r
-\r
-    /**\r
-     * Adds given Contact instance to list\r
-     * \r
-     * @param contact Contact instance to add\r
-     */\r
-    public void addContact (final Contact contact);\r
-\r
-    /**\r
-     * Let the user add a new other address\r
-     */\r
-    public void addOtherAddress();\r
-\r
-    /**\r
-     * The user can change address data, like street, ZIP code, city and country\r
-     * of given Contact instance.\r
-     * \r
-     * @param contact Instance to change data\r
-     * @param client Client instance to call back\r
-     */\r
-    public void doChangeAddressData (final Contact contact, final Client client);\r
-\r
-    /**\r
-     * The user can change name data, like gender, surname, family name and\r
-     * company name (if business contact).\r
-     * \r
-     * @param contact Instance to change data\r
-     * @param client Client instance to call back\r
-     */\r
-    public void doChangeNameData (final Contact contact, final Client client);\r
-\r
-    /**\r
-     * Let the user change other address\r
-     */\r
-    public void changeOtherAddress();\r
-\r
-    /**\r
-     * The user can change other data, like phone numbers or comments.\r
-     * \r
-     * @param contact Instance to change data\r
-     * @param client Client instance to call back\r
-     */\r
-    public void doChangeOtherData (final Contact contact, final Client client);\r
-\r
-    /**\r
-     * Let the user change own data\r
-     */\r
-    public void changeOwnData();\r
-\r
-    /**\r
-     * Let the user delete other address\r
-     */\r
-    public void deleteOtherAddress();\r
-\r
-    /**\r
-     * Asks user for own data\r
-     */\r
-    public void doEnterOwnData();\r
-\r
-    /**\r
-     * Getter for whole list\r
-     * @return List of all contacts\r
-     */\r
-    public List<Contact> getList ();\r
-\r
-    /**\r
-     * Searches address book for a contact\r
-     */\r
-    public void searchContacts ();\r
-\r
-    /**\r
-     * Getter for size\r
-     *\r
-     * @return size of contact "book"\r
-     */\r
-    public int size();\r
-}\r
+/*
+ * Copyright (C) 2015 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.manager.contact;
+
+import org.mxchange.addressbook.contact.Contact;
+import org.mxchange.addressbook.contact.Gender;
+import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
+import org.mxchange.jcore.manager.Manageable;
+
+/**
+ *
+ * @author Roland Haeder
+ */
+public interface ManageableContact extends Manageable {
+       /**
+        * Allows the user to enter own cellphone number.
+        *
+        * @return Cellphone number
+        */
+       public String enterOwnCellNumber ();
+
+       /**
+        * Allows the user to enter own city name.
+        *
+        * @return City name
+        */
+       public String enterOwnCity ();
+
+       /**
+        * Allows the user to enter comment for own entry.
+        *
+        * @return Comment
+        */
+       public String enterOwnComment ();
+
+       /**
+        * Allows the user to enter own company name.
+        *
+        * @return Company name
+        */
+       public String enterOwnCompanyName ();
+
+       /**
+        * Allows the user to enter own country code.
+        *
+        * @return Country code
+        */
+       public String enterOwnCountryCode ();
+
+       /**
+        * Allows the user to enter own email address.
+        *
+        * @return Email address
+        */
+       public String enterOwnEmailAddress ();
+
+       /**
+        * Allows the user to enter own family name.
+        *
+        * @return Family name
+        */
+       public String enterOwnFamilyName ();
+
+       /**
+        * Allows the user to enter own fax number.
+        *
+        * @return Fax number
+        */
+       public String enterOwnFaxNumber ();
+
+       /**
+        * Allows the user to enter own gender.
+        *
+        * @return Gender
+        */
+       public Gender enterOwnGender ();
+
+       /**
+        * Allows the user to enter own phone number.
+        *
+        * @return Phone number
+        */
+       public String enterOwnPhoneNumber ();
+
+       /**
+        * Allows the user to enter own street and house number.
+        *
+        * @return Street and house number
+        */
+       public String enterOwnStreet ();
+
+       /**
+        * Allows the user to enter own surname.
+        *
+        * @return Surname
+        */
+       public String enterOwnSurname ();
+
+       /**
+        * Allows the user to enter own ZIP code.
+        *
+        * @return ZIP code
+        */
+       public int enterOwnZipCode ();
+
+       /**
+        * Getter for column count
+        *
+        * @return Column count
+        */
+       public int getColumnCount ();
+
+       /**
+        * List all contacts
+        */
+       public void doListContacts ();
+
+       /**
+        * Getter for column name at given index.
+        *
+        * @param columnIndex Column index
+        * @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
+        *
+        * @param contact Contact being added
+        * @todo Add check for book size
+        */
+       public void registerContact (final Contact contact);
+
+       /**
+        * 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) throws ContactAlreadyAddedException;
+
+       /**
+        * Let the user add a new other address
+        */
+       public void doAddOtherAddress ();
+
+       /**
+        * The user can change address data, like street, ZIP code, city and country
+        * of given Contact instance.
+        *
+        * @param contact Instance to change data
+        */
+       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
+        */
+       public void doChangeNameData (final Contact contact);
+
+       /**
+        * Let the user change other address
+        */
+       public void doChangeOtherAddress ();
+
+       /**
+        * The user can change other data, like phone numbers or comments.
+        *
+        * @param contact Instance to change data
+        */
+       public void doChangeOtherData (final Contact contact);
+
+       /**
+        * Let the user change own data
+        */
+       public void doChangeOwnData ();
+
+       /**
+        * Let the user delete other address
+        */
+       public void doDeleteOtherAddress ();
+
+       /**
+        * Asks user for own data
+        * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If own contact is already added
+        */
+       public void doEnterOwnData () throws ContactAlreadyAddedException;
+
+       /**
+        * Searches address book for a contact
+        */
+       public void doSearchContacts ();
+
+       /**
+        * Checks whether own contact is already added by checking all entries for
+        * isOwnContact flag
+        *
+        * @return Whether own contact is already added
+        */
+       public boolean isOwnContactAdded ();
+
+       /**
+        * Getter for size
+        *
+        * @return size of contact "book"
+        */
+       public int size ();
+}