X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Forg%2Fmxchange%2Faddressbook%2Fclient%2Fconsole%2FConsoleClient.java;h=19d9c747ac56305df4a45288b102677331221d64;hb=ec369eb6588691f398134ca22fc01ed423136724;hp=65a6026502c924f17fe610f8f573e65399ff3a5c;hpb=64465fceb4695b3e3daeeb592984a949f99b7902;p=addressbook-swing.git
diff --git a/src/org/mxchange/addressbook/client/console/ConsoleClient.java b/src/org/mxchange/addressbook/client/console/ConsoleClient.java
index 65a6026..19d9c74 100644
--- a/src/org/mxchange/addressbook/client/console/ConsoleClient.java
+++ b/src/org/mxchange/addressbook/client/console/ConsoleClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Roland Haeder
+ * Copyright (C) 2016, 2017 Roland Häder
*
* 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
@@ -39,14 +39,14 @@ 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.cellphone.DialableCellphoneNumber;
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
*
- * @author Roland Haeder
+ * @author Roland Häder
*/
public class ConsoleClient extends BaseAddressbookClient implements AddressbookClient {
@@ -124,8 +124,8 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
throw new NullPointerException("contact is null"); //NOI18N
}
- // Cellphone and such ...
- this.outputMessage(MessageFormat.format("Telefonnumer: {0}\nFaxnummer: {1}\nHandy: {2}\nKommentar:\n{3}", contact.getContactPhoneNumber(), contact.getContactFaxNumber(), contact.getContactCellphoneNumber(), contact.getContactComment()));
+ // Mobile and such ...
+ this.outputMessage(MessageFormat.format("Telefonnumer: {0}\nFaxnummer: {1}\nHandy: {2}\nKommentar:\n{3}", contact.getContactLandLineNumber(), contact.getContactFaxNumber(), contact.getContactMobileNumber(), contact.getContactComment()));
// Trace message
this.getLoggerBeanLocal().logTrace("EXIT!"); //NOI18N
@@ -235,7 +235,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
DialableLandLineNumber phoneNumber = manager.enterOwnPhoneNumber();
// Phone number
- DialableCellphoneNumber cellphonePhoneNumber = manager.enterOwnCellNumber();
+ DialableMobileNumber mobileNumber = manager.enterOwnCellNumber();
// Fax number
DialableFaxNumber faxNumber = manager.enterOwnFaxNumber();
@@ -247,8 +247,8 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
String comment = manager.enterOwnComment();
// Update contact instance
- contact.setContactPhoneNumber(phoneNumber);
- contact.setContactCellphoneNumber(cellphonePhoneNumber);
+ contact.setContactLandLineNumber(phoneNumber);
+ contact.setContactMobileNumber(mobileNumber);
contact.setContactFaxNumber(faxNumber);
contact.setContactEmailAddress(email);
contact.setContactComment(comment);
@@ -366,6 +366,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
}
@Override
+ @SuppressWarnings ("UseOfSystemOutOrSystemErr")
public char enterChar (final char[] validChars, final String message) {
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("validChars={0},message={1} - CALLED!", Arrays.toString(validChars), message)); //NOI18N
@@ -427,6 +428,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
}
@Override
+ @SuppressWarnings ("UseOfSystemOutOrSystemErr")
public int enterInt (final int minimum, final int maximum, final String message) {
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("minimum={0},maximum={1},message={2} - CALLED!", minimum, maximum, message)); //NOI18N
@@ -454,6 +456,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
}
@Override
+ @SuppressWarnings ("UseOfSystemOutOrSystemErr")
public String enterString (final int minLength, final int maxLength, final String message, final boolean allowEmpty) {
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("minLength={0},maxLength={1},message={2}allowEmpty={3} - CALLED!", minLength, maxLength, message, allowEmpty)); //NOI18N
@@ -507,6 +510,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
}
@Override
+ @SuppressWarnings ("UseOfSystemOutOrSystemErr")
public void outputMessage (final String message) {
System.out.println(message);
}
@@ -531,7 +535,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
public void showWelcome () {
this.outputMessage(MessageFormat.format("Welcome to {0}", AddressbookApplication.printableTitle())); //NOI18N
this.outputMessage(""); //NOI18N
- this.outputMessage("Copyright(c) 2015 by Roland Haeder, this is free software"); //NOI18N
+ this.outputMessage("Copyright(c) 2016 by Roland Häder, this is free software"); //NOI18N
// Debug message
this.getLoggerBeanLocal().logDebug("Intro shown to user"); //NOI18N
@@ -656,4 +660,5 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
// Trace message
this.getLoggerBeanLocal().logTrace("EXIT!"); //NOI18N
}
+
}