]> git.mxchange.org Git - addressbook-lib.git/blobdiff - src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java
More cleanup from TDGP usage and towards EJB
[addressbook-lib.git] / src / org / mxchange / addressbook / manager / contact / AddressbookContactManager.java
index 23ca2f229a0ce0d72def313fc44722fea37e0522..18c8bd48745da2b04b1cf5b6ed16c75e7c6d211d 100644 (file)
@@ -29,12 +29,7 @@ import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
 import org.mxchange.jcore.client.Client;
 import org.mxchange.jcore.contact.Contact;
 import org.mxchange.jcore.contact.gender.Gender;
-import org.mxchange.jcore.database.frontend.DatabaseFrontend;
-import org.mxchange.jcore.database.storage.Storable;
-import org.mxchange.jcore.exceptions.BadTokenException;
-import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
 import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
-import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
 import org.mxchange.jcore.manager.BaseManager;
 
 /**
@@ -60,10 +55,9 @@ public class AddressbookContactManager extends BaseManager implements Manageable
         * a client instance.
         *
         * @param client Client instance to use
-        * @throws org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException If the configured database backend is not supported
         * @throws java.sql.SQLException If an SQL error occurs
         */
-       public AddressbookContactManager (final Client client) throws UnsupportedDatabaseBackendException, SQLException {
+       public AddressbookContactManager (final Client client) throws SQLException {
                // Trace message
                this.getLogger().trace(MessageFormat.format("client={1} - CALLED!", client)); //NOI18N
 
@@ -240,7 +234,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
         * Allows the user to change his/her own data
         */
        @Override
-       public void doChangeOwnData () throws IOException , BadTokenException, CorruptedDatabaseFileException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException{
+       public void doChangeOwnData () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException{
                // Trace message
                this.getLogger().trace("CALLED!"); //NOI18N
 
@@ -291,7 +285,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
         * Asks user for own data
         */
        @Override
-       public void doEnterOwnData () throws ContactAlreadyAddedException, IOException , BadTokenException {
+       public void doEnterOwnData () throws ContactAlreadyAddedException, IOException {
                // Trace message
                this.getLogger().trace("CALLED!"); //NOI18N
 
@@ -641,7 +635,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
         * @return Whether own contact is already added
         */
        @Override
-       public boolean isOwnContactAdded () throws IOException, BadTokenException {
+       public boolean isOwnContactAdded () throws IOException {
                // Trace message
                this.getLogger().trace("CALLED!"); //NOI18N
 
@@ -651,7 +645,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                try {
                        // Deligate this call to frontend
                        isAdded = ((AddressbookContactFrontend) this.getFrontend()).isOwnContactFound();
-               } catch (final SQLException | IOException | BadTokenException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+               } catch (final SQLException | IOException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
                        // Something bad happened
                        this.abortProgramWithException(ex);
                }
@@ -694,7 +688,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
 
                        // Add contact to internal list
                        this.addContact(contact);
-               } catch (final ContactAlreadyAddedException | BadTokenException | SQLException | IOException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+               } catch (final ContactAlreadyAddedException | SQLException | IOException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
                        // Abort here
                        this.abortProgramWithException(ex);
                }
@@ -770,13 +764,11 @@ public class AddressbookContactManager extends BaseManager implements Manageable
         * @return Contact instance or null
         * @throws java.sql.SQLException If an SQL error occurs
         * @throws java.io.IOException If an IO error occurs
-        * @throws org.mxchange.jcore.exceptions.BadTokenException Continued throw
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         * @throws java.lang.NoSuchMethodException If a method cannot be found
         * @throws java.lang.IllegalAccessException If a method is not accessible
         * @throws java.lang.reflect.InvocationTargetException Any other problems?
         */
-       private Contact getOwnContact () throws IOException, BadTokenException, CorruptedDatabaseFileException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+       private Contact getOwnContact () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Trace message
                this.getLogger().trace("CALLED!"); //NOI18N