throw new UnsupportedOperationException("Not supported yet.");\r
}\r
\r
+ /**\r
+ * Let the user change other address\r
+ */\r
+ @Override\r
+ public void changeOtherAddress () {\r
+ throw new UnsupportedOperationException("Not supported yet.");\r
+ }\r
+\r
+ /**\r
+ * Allows the user to change his/her own data\r
+ */\r
+ @Override\r
+ public void changeOwnData () {\r
+ /*\r
+ * First check if the user has registered own contact, before that\r
+ * nothing can be changed.\r
+ */\r
+ if (!this.isOwnContactAdded()) {\r
+ // Not added\r
+ this.getClient().outputMessage("Sie haben noch nicht Ihre Daten eingegeben.");\r
+ \r
+ // Skip any below code\r
+ return;\r
+ }\r
+ \r
+ // Instance\r
+ Contact contact = this.getOwnContact();\r
+ \r
+ // It must be found\r
+ assert(contact instanceof Contact);\r
+ \r
+ // Display contact\r
+ contact.show(this.getClient());\r
+ \r
+ try {\r
+ // Ask user what to change\r
+ this.getClient().userChooseChangeContactData(contact);\r
+ } catch (final UnhandledUserChoiceException ex) {\r
+ this.getLogger().catching(ex);\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Let the user delete other address\r
+ */\r
+ @Override\r
+ public void deleteOtherAddress () {\r
+ throw new UnsupportedOperationException("Not supported yet.");\r
+ }\r
+\r
/**\r
* Let the user change address data\r
* \r
* @param client Client instance to call back\r
*/\r
@Override\r
- public void changeAddressData (final Contact contact, final Client client) {\r
+ public void doChangeAddressData (final Contact contact, final Client client) {\r
// First display it again\r
client.displayAddressBox(contact);\r
\r
* @param client Client instance to call back\r
*/\r
@Override\r
- public void changeNameData (final Contact contact, final Client client) {\r
+ public void doChangeNameData (final Contact contact, final Client client) {\r
// First display them again\r
client.displayNameBox(contact);\r
\r
}\r
}\r
\r
- /**\r
- * Let the user change other address\r
- */\r
- @Override\r
- public void changeOtherAddress () {\r
- throw new UnsupportedOperationException("Not supported yet.");\r
- }\r
-\r
/**\r
* Let the user change other data\r
*\r
* @param client Client instance to call back\r
*/\r
@Override\r
- public void changeOtherData (final Contact contact, final Client client) {\r
- throw new UnsupportedOperationException("Not supported yet.");\r
- }\r
-\r
- /**\r
- * Allows the user to change his/her own data\r
- */\r
- @Override\r
- public void changeOwnData () {\r
- /*\r
- * First check if the user has registered own contact, before that \r
- * nothing can be changed.\r
- */\r
- if (!this.isOwnContactAdded()) {\r
- // Not added\r
- this.getClient().outputMessage("Sie haben noch nicht Ihre Daten eingegeben.");\r
-\r
- // Skip any below code\r
- return;\r
- }\r
-\r
- // Instance\r
- Contact contact = this.getOwnContact();\r
-\r
- // It must be found\r
- assert(contact instanceof Contact);\r
-\r
- // Display contact\r
- contact.show(this.getClient());\r
-\r
- try {\r
- // Ask user what to change\r
- this.getClient().doUserChangeAdressChoice(contact);\r
- } catch (final UnhandledUserChoiceException ex) {\r
- this.getLogger().catching(ex);\r
- }\r
- }\r
-\r
- /**\r
- * Let the user delete other address\r
- */\r
- @Override\r
- public void deleteOtherAddress () {\r
+ public void doChangeOtherData (final Contact contact, final Client client) {\r
throw new UnsupportedOperationException("Not supported yet.");\r
}\r
\r
* Asks user for own data\r
*/\r
@Override\r
- public void enterOwnData () {\r
+ public void doEnterOwnData () {\r
// First ask for gender\r
char gender = this.enterOwnGender();\r
\r
* @return User's own country code\r
*/\r
private String enterOwnCountryCode () {\r
- return this.getClient().enterString(2, 2, "Bitte geben Sie den zweistelligen Ländercode von Ihrem Land ein: ", false);\r
+ return this.getClient().enterString(2, 2, "Bitte geben Sie den zweistelligen Ländercode von Ihrem Land ein: ", false).toUpperCase();\r
}\r
\r
/**\r