package org.mxchange.addressbook.client;
import org.mxchange.addressbook.menu.item.SelectableMenuItem;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.contact.title.PersonalTitle;
+import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jcontacts.model.contact.title.PersonalTitle;
import org.mxchange.jcore.client.Client;
import org.mxchange.jcore.exceptions.MenuInitializationException;
import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
* Asks the the user to enter a single character which must match validChars
* <p>
* @param validChars Valid chars that are accepted
- * @param message Message to user
+ * @param message Message to user
* <p>
* @return Allowed character
*/
char enterChar (final char[] validChars, final String message);
/**
- * Asks the user to enter his/her personal title (M=Male, F=Female, C=Company)
+ * Asks the user to enter his/her personal title (M=Male, F=Female,
+ * C=Company)
* <p>
* @param message Message to output
* <p>
* string should be generally not allowed, but might be okay for e.g.
* company name.
* <p>
- * @param minLength Minimum length of the string to read
- * @param maxLength Maximum length of the string to read
- * @param message Message to user
+ * @param minLength Minimum length of the string to read
+ * @param maxLength Maximum length of the string to read
+ * @param message Message to user
* @param allowEmpty Whether empty strings are allowed
* <p>
* @return Entered string by user or null if empty string is allowed
* Some "Getter" for menu item
* <p>
* @param accessKey Key to press to access this menu
- * @param text Text to show to user
+ * @param text Text to show to user
* <p>
* @return
*/
import org.mxchange.addressbook.menu.console.ConsoleMenu;
import org.mxchange.addressbook.menu.item.SelectableMenuItem;
import org.mxchange.addressbook.menu.item.console.ConsoleMenuItem;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.contact.UserContact;
-import org.mxchange.jcontacts.contact.title.PersonalTitle;
-import org.mxchange.jcontacts.contact.title.PersonalTitleUtils;
-import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataAlreadyAddedException;
+import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jcontacts.model.contact.UserContact;
+import org.mxchange.jcontacts.model.contact.title.PersonalTitle;
+import org.mxchange.jcontacts.model.utils.PersonalTitleUtils;
+import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicDataAlreadyAddedException;
import org.mxchange.jcore.application.Application;
import org.mxchange.jcore.exceptions.MenuInitializationException;
import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
/**
* A client for the console
switch (choice) {
case '1':
try {
- // Enter/add own data
- manager.doEnterOwnData();
- } catch (final BusinessDataAlreadyAddedException ex) {
- // Already added
- this.outputMessage("Sie haben bereits Ihre eigenen Daten eingegeben.");
- }
- break;
+ // Enter/add own data
+ manager.doEnterOwnData();
+ } catch (final BasicDataAlreadyAddedException ex) {
+ // Already added
+ this.outputMessage("Sie haben bereits Ihre eigenen Daten eingegeben.");
+ }
+ break;
case '2': // Change own data
manager.doChangeOwnData();
case '0':
try {
- // Program exit
- this.getApplication().doShutdown();
- } catch (final SQLException | IOException ex) {
- this.abortProgramWithException(ex);
- }
- break;
+ // Program exit
+ this.getApplication().doShutdown();
+ } catch (final SQLException | IOException ex) {
+ this.abortProgramWithException(ex);
+ }
+ break;
default:
// TODO throw own exception
import java.util.Iterator;
import java.util.List;
import org.mxchange.addressbook.client.AddressbookClient;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.contact.title.PersonalTitle;
-import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataAlreadyAddedException;
+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.client.Client;
import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
import org.mxchange.jcore.facade.BaseFacade;
import org.mxchange.jcoreeelogger.beans.local.logger.Log;
import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
+import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
/**
* A facade for contacts.
}
@Override
- public void addContact (final Contact contact) throws BusinessDataAlreadyAddedException {
+ public void addContact (final Contact contact) throws BasicDataAlreadyAddedException {
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("contact={0} - CALLED!", contact)); //NOI18N
}
@Override
- public void doEnterOwnData () throws BusinessDataAlreadyAddedException {
+ public void doEnterOwnData () throws BasicDataAlreadyAddedException {
// Trace message
this.getLoggerBeanLocal().logTrace("CALLED!"); //NOI18N
// Is own contact already added?
if (this.isOwnContactAdded()) {
// Don't continue here
- throw new BusinessDataAlreadyAddedException();
+ throw new BasicDataAlreadyAddedException();
}
// Get and cast client instance
// Add contact to internal list
this.addContact(contact);
- } catch (final BusinessDataAlreadyAddedException ex) {
+ } catch (final BasicDataAlreadyAddedException ex) {
// Abort here
this.abortProgramWithException(ex);
}
package org.mxchange.addressbook.facade.contact;
import java.io.IOException;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.contact.title.PersonalTitle;
import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
-import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataAlreadyAddedException;
+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.data.Country;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
+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>
* @param contact Contact instance to add
* <p>
- * @throws
- * org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataAlreadyAddedException
- * If the contact is already added
+ * @throws BasicDataAlreadyAddedException If the contact is already added
*/
- void addContact (final Contact contact) throws BusinessDataAlreadyAddedException;
+ void addContact (final Contact contact) throws BasicDataAlreadyAddedException;
/**
* Let the user add a new other address