]> git.mxchange.org Git - jaddressbook-lib.git/commitdiff
Sorted members
authorRoland Haeder <roland@mxchange.org>
Fri, 24 Jul 2015 10:34:37 +0000 (12:34 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 24 Jul 2015 10:34:37 +0000 (12:34 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

Addressbook/src/org/mxchange/addressbook/manager/contact/ContactManager.java

index 8dc33aac9a09731f41fc89b86b2a1e03b4c0f678..e950e42ca89059ae32e567579fedadebbda1d95e 100644 (file)
@@ -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
      *