]> git.mxchange.org Git - addressbook-swing.git/blobdiff - src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java
auto-reformatted most project files
[addressbook-swing.git] / src / org / mxchange / addressbook / manager / contact / AddressbookContactManager.java
index d5833c45921a99f542344ad719d7ecec7ae4e44e..9b0a0b33d45f358615c38e3d031ec4fb1ebcc4e5 100644 (file)
@@ -47,17 +47,17 @@ public class AddressbookContactManager extends BaseManager implements Manageable
         */
        private final List<String> columnNames;
 
-       /**
-        * Translated column name list
-        */
-       private final List<String> translatedColumnNames;
-
        /**
         * Logger instance
         */
        @Log
        private LoggerBeanLocal logger;
 
+       /**
+        * Translated column name list
+        */
+       private final List<String> translatedColumnNames;
+
        /**
         * Constructor which accepts maxContacts for maximum (initial) contacts and
         * a client instance.
@@ -93,11 +93,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                //* NOISY-DEBUG: */ this.getLogger().logDebug("client=" + client);
        }
 
-       /**
-        * Adds given Contact instance to list
-        * <p>
-        * @param contact Contact instance to add
-        */
        @Override
        public void addContact (final Contact contact) throws ContactAlreadyAddedException {
                // Trace message
@@ -116,19 +111,11 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
-       /**
-        * Let the user add a new other address
-        */
        @Override
        public void doAddOtherAddress () {
                throw new UnsupportedOperationException("Not supported yet."); //NOI18N
        }
 
-       /**
-        * Let the user change address data
-        * <p>
-        * @param contact Instance to change data
-        */
        @Override
        public void doChangeAddressData (final Contact contact) {
                // Trace message
@@ -163,11 +150,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
-       /**
-        * Let the user change "name data"
-        * <p>
-        * @param contact Instance to change data
-        */
        @Override
        public void doChangeNameData (final Contact contact) {
                // Trace message
@@ -198,19 +180,11 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
-       /**
-        * Let the user change other address
-        */
        @Override
        public void doChangeOtherAddress () {
                throw new UnsupportedOperationException("Not supported yet."); //NOI18N
        }
 
-       /**
-        * Let the user change other data
-        * <p>
-        * @param contact Instance to change data TODO Didn't handle birthday
-        */
        @Override
        public void doChangeOtherData (final Contact contact) {
                // Trace message
@@ -241,9 +215,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
-       /**
-        * Allows the user to change his/her own data
-        */
        @Override
        public void doChangeOwnData () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Trace message
@@ -284,17 +255,11 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
-       /**
-        * Let the user delete other address
-        */
        @Override
        public void doDeleteOtherAddress () {
                throw new UnsupportedOperationException("Not supported yet."); //NOI18N
        }
 
-       /**
-        * Asks user for own data
-        */
        @Override
        public void doEnterOwnData () throws ContactAlreadyAddedException, IOException {
                // Trace message
@@ -332,12 +297,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                throw new UnsupportedOperationException("Not supported yet."); //NOI18N
        }
 
-       /**
-        * Shuts down this contact manager
-        * <p>
-        * @throws java.sql.SQLException If an SQL error occurs
-        * @throws java.io.IOException If an IO error occurs
-        */
        @Override
        public void doShutdown () throws SQLException, IOException {
                // Trace message
@@ -350,11 +309,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
-       /**
-        * Asks the user for his/her cellphone number
-        * <p>
-        * @return User's cellphone number
-        */
        @Override
        public String enterOwnCellNumber () {
                // Trace message
@@ -366,11 +320,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterString(5, 30, "Bitte geben Sie Ihre Handynummer an: ", true);
        }
 
-       /**
-        * Asks the user for his/her city's name
-        * <p>
-        * @return City's name of the user
-        */
        @Override
        public String enterOwnCity () {
                // Trace message
@@ -382,11 +331,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterString(3, 50, "Bitte geben Sie Ihre Wohnort ein: ", false);
        }
 
-       /**
-        * Asks the user for his/her city's name
-        * <p>
-        * @return City's name of the user
-        */
        @Override
        public String enterOwnComment () {
                // Trace message
@@ -398,11 +342,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterString(0, 100, "Kommentar zu Ihrem Eintrag: ", true);
        }
 
-       /**
-        * Asks the user for his/her company name
-        * <p>
-        * @return User's company name
-        */
        @Override
        public String enterOwnCompanyName () {
                // Trace message
@@ -414,11 +353,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterString(5, 50, "Bitte geben Sie Ihre Firmenbezeichnung ein: ", true);
        }
 
-       /**
-        * Asks user for his/her own country code
-        * <p>
-        * @return User's own country code
-        */
        @Override
        public String enterOwnCountryCode () {
                // Trace message
@@ -430,11 +364,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterString(2, 2, "Bitte geben Sie den zweistelligen Ländercode von Ihrem Land ein: ", false).toUpperCase();
        }
 
-       /**
-        * Asks user for his/her own country code
-        * <p>
-        * @return User's own country code
-        */
        @Override
        public String enterOwnEmailAddress () {
                // Trace message
@@ -446,11 +375,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterString(10, 50, "Bitte geben Sie Ihre Email-Adresse ein: ", true);
        }
 
-       /**
-        * Asks the user for family name
-        * <p>
-        * @return Family name of the user
-        */
        @Override
        public String enterOwnFamilyName () {
                // Trace message
@@ -462,11 +386,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterString(2, 50, "Bitte geben Sie Ihren Nachnamen ein: ", false);
        }
 
-       /**
-        * Asks the user for family name
-        * <p>
-        * @return Family name of the user
-        */
        @Override
        public String enterOwnFaxNumber () {
                // Trace message
@@ -478,11 +397,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterString(5, 30, "Bitte geben Sie Ihre Faxnummer an: ", true);
        }
 
-       /**
-        * Asks the user for surname
-        * <p>
-        * @return Surname of the user
-        */
        @Override
        public String enterOwnFirstName () {
                // Trace message
@@ -494,11 +408,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterString(2, 50, "Bitte geben Sie Ihren Vornamen ein: ", false);
        }
 
-       /**
-        * Asks the user for gender, until a valid has been entered
-        * <p>
-        * @return Gender of the user
-        */
        @Override
        public Gender enterOwnGender () {
                // Trace message
@@ -510,11 +419,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterGender("Bitte geben Sie die Anrede ein: (M=Herr, F=Frau, C=Firma): ");
        }
 
-       /**
-        * Asks the user for phone number
-        * <p>
-        * @return Phone number of the user
-        */
        @Override
        public String enterOwnPhoneNumber () {
                // Trace message
@@ -526,11 +430,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterString(5, 30, "Bitte geben Sie Ihre Telefonnummer an: ", true);
        }
 
-       /**
-        * Asks the user for own street (including number)
-        * <p>
-        * @return Own street an number
-        */
        @Override
        public String enterOwnStreet () {
                // Trace message
@@ -542,11 +441,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return client.enterString(5, 50, "Bitte geben Sie Ihre Strasse und Hausnummer ein: ", false);
        }
 
-       /**
-        * Asks the user for own ZIP code
-        * <p>
-        * @return ZIP code
-        */
        @Override
        public int enterOwnZipCode () {
                // Trace message
@@ -620,12 +514,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return value;
        }
 
-       /**
-        * Checks whether own contact is already added by checking all entries for
-        * isOwnContact flag
-        * <p>
-        * @return Whether own contact is already added
-        */
        @Override
        public boolean isOwnContactAdded () throws IOException {
                // Trace message
@@ -649,20 +537,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                return isAdded;
        }
 
-       /**
-        * Logs given exception
-        * <p>
-        * @param exception Throwable
-        */
-       protected void logException (final Throwable exception) {
-               this.getLogger().logException(exception);
-       }
-
-       /**
-        * Adds given contact to address book and flushes all entries to database
-        * <p>
-        * @param contact Contact being added TODO Add check for book size
-        */
        @Override
        public void registerContact (final Contact contact) {
                // Trace message
@@ -784,4 +658,13 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                // Return instance or null
                return contact;
        }
+
+       /**
+        * Logs given exception
+        * <p>
+        * @param exception Throwable
+        */
+       protected void logException (final Throwable exception) {
+               this.getLogger().logException(exception);
+       }
 }