From 9b17d1b8855a20655265b4e8de157ec55a328f18 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 24 Jul 2015 12:34:37 +0200 Subject: [PATCH] =?utf8?q?Sorted=20members=20Signed-off-by:Roland=20H?= =?utf8?q?=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../manager/contact/ContactManager.java | 120 +++++++++--------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/Addressbook/src/org/mxchange/addressbook/manager/contact/ContactManager.java b/Addressbook/src/org/mxchange/addressbook/manager/contact/ContactManager.java index 8dc33aa..e950e42 100644 --- a/Addressbook/src/org/mxchange/addressbook/manager/contact/ContactManager.java +++ b/Addressbook/src/org/mxchange/addressbook/manager/contact/ContactManager.java @@ -100,56 +100,6 @@ public class ContactManager extends BaseManager implements ManageableContact { throw new UnsupportedOperationException("Not supported yet."); } - /** - * Let the user change other address - */ - @Override - public void doChangeOtherAddress () { - throw new UnsupportedOperationException("Not supported yet."); - } - - /** - * Allows the user to change his/her own data - */ - @Override - public void doChangeOwnData () { - /* - * First check if the user has registered own contact, before that - * nothing can be changed. - */ - if (!this.isOwnContactAdded()) { - // Not added - this.getClient().outputMessage("Sie haben noch nicht Ihre Daten eingegeben."); - - // Skip any below code - return; - } - - // Instance - Contact contact = this.getOwnContact(); - - // It must be found - assert(contact instanceof Contact); - - // Display contact - contact.show(this.getClient()); - - try { - // Ask user what to change - this.getClient().userChooseChangeContactData(contact); - } catch (final UnhandledUserChoiceException ex) { - this.getLogger().catching(ex); - } - } - - /** - * Let the user delete other address - */ - @Override - public void doDeleteOtherAddress () { - throw new UnsupportedOperationException("Not supported yet."); - } - /** * Let the user change address data * @@ -198,6 +148,14 @@ public class ContactManager extends BaseManager implements ManageableContact { this.flush(); } + /** + * Let the user change other address + */ + @Override + public void doChangeOtherAddress () { + throw new UnsupportedOperationException("Not supported yet."); + } + /** * Let the user change other data * @@ -223,6 +181,48 @@ public class ContactManager extends BaseManager implements ManageableContact { this.flush(); } + /** + * Allows the user to change his/her own data + */ + @Override + public void doChangeOwnData () { + /* + * First check if the user has registered own contact, before that + * nothing can be changed. + */ + if (!this.isOwnContactAdded()) { + // Not added + this.getClient().outputMessage("Sie haben noch nicht Ihre Daten eingegeben."); + + // Skip any below code + return; + } + + // Instance + Contact contact = this.getOwnContact(); + + // It must be found + assert(contact instanceof Contact); + + // Display contact + contact.show(this.getClient()); + + try { + // Ask user what to change + this.getClient().userChooseChangeContactData(contact); + } catch (final UnhandledUserChoiceException ex) { + this.getLogger().catching(ex); + } + } + + /** + * Let the user delete other address + */ + @Override + public void doDeleteOtherAddress () { + throw new UnsupportedOperationException("Not supported yet."); + } + /** * Asks user for own data */ @@ -235,6 +235,16 @@ public class ContactManager extends BaseManager implements ManageableContact { this.registerContact(contact); } + @Override + public void doListContacts () { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void doSearchContacts () { + throw new UnsupportedOperationException("Not supported yet."); + } + /** * Shuts down this contact manager */ @@ -422,11 +432,6 @@ public class ContactManager extends BaseManager implements ManageableContact { return isAdded; } - @Override - public void doListContacts () { - throw new UnsupportedOperationException("Not supported yet."); - } - /** * Adds given contact to address book and flushes all entries to database * @@ -454,11 +459,6 @@ public class ContactManager extends BaseManager implements ManageableContact { this.flush(); } - @Override - public void doSearchContacts () { - throw new UnsupportedOperationException("Not supported yet."); - } - /** * Getter for size * -- 2.39.5