]> git.mxchange.org Git - addressbook-swing.git/blobdiff - src/org/mxchange/addressbook/facade/contact/ContactFacade.java
Updated copyright year
[addressbook-swing.git] / src / org / mxchange / addressbook / facade / contact / ContactFacade.java
index aac08dd38ba4765b528dd6a9c784a52ca172e2f3..71760a218eb6523ab0b00de103eb5352f8b173da 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Roland Haeder
+ * Copyright (C) 2016 - 2024 Free Software Foundation
  *
  * 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
 package org.mxchange.addressbook.facade.contact;
 
 import java.io.IOException;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.contact.gender.Gender;
 import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
+import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jcontacts.model.contact.title.PersonalTitle;
+import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicDataAlreadyAddedException;
 import org.mxchange.jcore.facade.Facade;
+import org.mxchange.jcountry.model.data.Country;
+import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
 
 /**
  * An interface for addressbook contact manager
  * <p>
- * @author Roland Haeder
+ * @author Roland Häder<roland@mxchange.org>
  */
 public interface ContactFacade extends Facade {
 
@@ -33,14 +38,15 @@ public interface ContactFacade extends Facade {
         * Adds given Contact instance to list
         * <p>
         * @param contact Contact instance to add
-        * @throws org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException If the contact is already added
+        * <p>
+        * @throws BasicDataAlreadyAddedException If the contact is already added
         */
-       public void addContact (final Contact contact) throws ContactAlreadyAddedException;
+       void addContact (final Contact contact) throws BasicDataAlreadyAddedException;
 
        /**
         * Let the user add a new other address
         */
-       public void doAddOtherAddress ();
+       void doAddOtherAddress ();
 
        /**
         * The user can change address data, like street, ZIP code, city and country
@@ -48,194 +54,198 @@ public interface ContactFacade extends Facade {
         * <p>
         * @param contact Instance to change data
         */
-       public void doChangeAddressData (final Contact contact);
+       void doChangeAddressData (final Contact contact);
 
        /**
-        * The user can change name data, like gender, surname, family name and
+        * The user can change name data, like title, surname, family name and
         * company name (if business contact).
         * <p>
         * @param contact Instance to change data
         */
-       public void doChangeNameData (final Contact contact);
+       void doChangeNameData (final Contact contact);
 
        /**
         * Let the user change other address
         */
-       public void doChangeOtherAddress ();
+       void doChangeOtherAddress ();
 
        /**
         * The user can change other data, like phone numbers or comments.
         * <p>
         * @param contact Instance to change data
         */
-       public void doChangeOtherData (final Contact contact);
+       void doChangeOtherData (final Contact contact);
 
        /**
         * Let the user change own data
         * <p>
         */
-       public void doChangeOwnData ();
+       void doChangeOwnData ();
 
        /**
         * Let the user delete other address
         */
-       public void doDeleteOtherAddress ();
+       void doDeleteOtherAddress ();
 
        /**
         * Asks user for own data
         * <p>
-        * @throws org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException If own contact is already added
-        * @throws java.io.IOException If an IO error was found
+        * @throws ContactAlreadyAddedException If own contact is already added
         */
-       public void doEnterOwnData () throws ContactAlreadyAddedException;
+       void doEnterOwnData () throws ContactAlreadyAddedException;
 
        /**
         * List all contacts
         */
-       public void doListContacts ();
+       void doListContacts ();
 
        /**
         * Searches address book for a contact
         */
-       public void doSearchContacts ();
+       void doSearchContacts ();
 
        /**
         * Allows the user to enter own cellphone number.
         * <p>
         * @return Cellphone number
         */
-       public String enterOwnCellNumber ();
+       DialableMobileNumber enterOwnCellNumber ();
 
        /**
         * Allows the user to enter own city name.
         * <p>
         * @return City name
         */
-       public String enterOwnCity ();
+       String enterOwnCity ();
 
        /**
         * Allows the user to enter comment for own entry.
         * <p>
         * @return Comment
         */
-       public String enterOwnComment ();
+       String enterOwnComment ();
 
        /**
         * Allows the user to enter own company name.
         * <p>
         * @return Company name
         */
-       public String enterOwnCompanyName ();
+       String enterOwnCompanyName ();
 
        /**
         * Allows the user to enter own country code.
         * <p>
         * @return Country code
         */
-       public String enterOwnCountryCode ();
+       Country enterOwnCountryCode ();
 
        /**
         * Allows the user to enter own email address.
         * <p>
         * @return Email address
         */
-       public String enterOwnEmailAddress ();
+       String enterOwnEmailAddress ();
 
        /**
         * Allows the user to enter own family name.
         * <p>
         * @return Family name
         */
-       public String enterOwnFamilyName ();
+       String enterOwnFamilyName ();
 
        /**
         * Allows the user to enter own fax number.
         * <p>
         * @return Fax number
         */
-       public String enterOwnFaxNumber ();
+       DialableFaxNumber enterOwnFaxNumber ();
 
        /**
         * Allows the user to enter own surname.
         * <p>
         * @return Surname
         */
-       public String enterOwnFirstName ();
+       String enterOwnFirstName ();
 
        /**
-        * Allows the user to enter own gender.
+        * Allows the user to enter own title.
         * <p>
-        * @return Gender
+        * @return PersonalTitle
         */
-       public Gender enterOwnGender ();
+       PersonalTitle enterOwnPersonalTitle ();
 
        /**
         * Allows the user to enter own phone number.
         * <p>
         * @return Phone number
         */
-       public String enterOwnPhoneNumber ();
+       DialableLandLineNumber enterOwnPhoneNumber ();
 
        /**
         * Allows the user to enter own street and house number.
         * <p>
         * @return Street and house number
         */
-       public String enterOwnStreet ();
+       String enterOwnStreet ();
 
        /**
         * Allows the user to enter own ZIP code.
         * <p>
         * @return ZIP code
         */
-       public int enterOwnZipCode ();
+       int enterOwnZipCode ();
 
        /**
         * Getter for column count
         * <p>
         * @return Column count TODO: This is needed for TableModel in Swing
         */
-       public int getColumnCount ();
+       int getColumnCount ();
 
        /**
         * Getter for column name at given index.
         * <p>
         * @param columnIndex Column index
+        * <p>
         * @return Database column name TODO: This is needed for TableModel in Swing
         */
-       public String getColumnName (final int columnIndex);
+       String getColumnName (final int columnIndex);
 
        /**
         * Getter for translated column name at given index.
         * <p>
         * @param columnIndex Column index
+        * <p>
         * @return Human-readable column name TODO: This is needed for TableModel in
-        * Swing
+        *         Swing
         */
-       public String getTranslatedColumnName (final int columnIndex);
+       String getTranslatedColumnName (final int columnIndex);
 
        /**
         * Somewhat "getter" for value from given row and column index
         * <p>
-        * @param rowIndex Row index
+        * @param rowIndex    Row index
         * @param columnIndex Column index
+        * <p>
         * @return Value from given row/column
         */
-       public Object getValueFromRowColumn (final int rowIndex, final int columnIndex);
+       Object getValueFromRowColumn (final int rowIndex, final int columnIndex);
 
        /**
         * Checks whether own contact is already added by checking all entries for
         * isOwnContact flag
         * <p>
         * @return Whether own contact is already added
+        * <p>
         * @throws java.io.IOException If an IO error occurs
         */
-       public boolean isOwnContactAdded () throws IOException;
+       boolean isOwnContactAdded () throws IOException;
 
        /**
         * Adds given contact to address book
         * <p>
         * @param contact Contact being added TODO Add check for book size
         */
-       public void registerContact (final Contact contact);
+       void registerContact (final Contact contact);
+
 }