]> git.mxchange.org Git - jbonuscard-lib.git/commitdiff
More cleanup from TDGP usage and towards EJB
authorRoland Haeder <roland@mxchange.org>
Fri, 4 Sep 2015 14:41:02 +0000 (16:41 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 4 Sep 2015 14:43:52 +0000 (16:43 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jcore.jar
lib/jswingcore.jar
nbproject/project.properties
src/org/mxchange/addressbook/application/AddressbookApplication.java
src/org/mxchange/addressbook/client/BaseAddressbookClient.java
src/org/mxchange/addressbook/client/console/ConsoleClient.java
src/org/mxchange/addressbook/client/gui/AddressbookFrame.java
src/org/mxchange/addressbook/client/gui/SwingClient.java
src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java
src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java

index 61bf6e66ad6bd0bf8dd1426ca007c203375c1a60..cadeea937e9b017b64ce4cf9dcab84bc48af5714 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index fd4296898ebe5cd0cfa4c5ea62cd16c70cd78719..960b58d575f620f5e04d8cc8273a13661e085b38 100644 (file)
Binary files a/lib/jswingcore.jar and b/lib/jswingcore.jar differ
index cd3475faf63b2798d8bdf68c7fee54b4a27c3a83..f004ceb190ddf32db6dc3c6d2d5ecafdc605d920 100644 (file)
@@ -32,21 +32,21 @@ endorsed.classpath=
 excludes=
 file.reference.commons-codec-1.10.jar=lib/commons-codec-1.10.jar
 file.reference.commons-lang3-3.4.jar=lib/commons-lang3-3.4.jar
+file.reference.jcore.jar=lib/jcore.jar
 file.reference.jswingcore.jar=lib/jswingcore.jar
 file.reference.log4j-api-2.3.jar=lib/log4j-api-2.3.jar
 file.reference.log4j-core-2.3.jar=lib/log4j-core-2.3.jar
-file.reference.jcore.jar=./lib/jcore.jar
 includes=**
 jar.archive.disabled=${jnlp.enabled}
 jar.compress=false
 jar.index=${jnlp.enabled}
 javac.classpath=\
-    ${file.reference.log4j-api-2.3.jar}:\
-    ${file.reference.log4j-core-2.3.jar}:\
     ${file.reference.jcore.jar}:\
+    ${file.reference.jswingcore.jar}:\
     ${file.reference.commons-codec-1.10.jar}:\
     ${file.reference.commons-lang3-3.4.jar}:\
-    ${file.reference.jswingcore.jar}
+    ${file.reference.log4j-api-2.3.jar}:\
+    ${file.reference.log4j-core-2.3.jar}
 # Space-separated list of extra javac options
 javac.compilerargs=-Xlint:deprecation -Xlint:unchecked
 javac.deprecation=true
@@ -102,7 +102,5 @@ run.test.classpath=\
 source.encoding=UTF-8
 source.reference.jcore.jar=../jcore/src/
 source.reference.jswingcore.jar=../jswingcore/src/
-source.reference.log4j-api-2.3.jar=/home/quix0r/MyProjects/JARs/log4j-api-2.3-sources.jar
-source.reference.log4j-core-2.3.jar=/home/quix0r/MyProjects/JARs/log4j-core-2.3-sources.jar
 src.dir=src
 test.src.dir=test
index 9a17d06b27127c8e384cf81fcb11f9b76af23006..21af4307ae90401fc7614eed849aa1eb913602b2 100644 (file)
@@ -150,7 +150,7 @@ public class AddressbookApplication extends BaseAddressbookSystem implements App
                this.initProperties();
 
                // Is the bundle initialized?
-               if (!this.isBundledInitialized()) {
+               if (!isBundledInitialized()) {
                        // Temporary initialize default bundle
                        // TODO The enum Gender uses this
                        this.initBundle();
index f14cd81cac9566c3cc7671198e4c13c2b39ffdba..3c5a8f614439851b37245c43d80b52502555a498 100644 (file)
@@ -24,7 +24,6 @@ import org.mxchange.addressbook.manager.contact.AddressbookContactManager;
 import org.mxchange.addressbook.menu.Menu;
 import org.mxchange.jcore.client.BaseClient;
 import org.mxchange.jcore.client.Client;
-import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
 import org.mxchange.jcore.manager.database.ManageableDatabase;
 
 /**
@@ -106,10 +105,9 @@ public abstract class BaseAddressbookClient extends BaseClient {
 
        /**
         * Initializes contact manager
-        * @throws org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException If the database backend is not supported
         * @throws java.sql.SQLException If any SQL error occurs
         */
-       protected void initContactManager () throws UnsupportedDatabaseBackendException, SQLException {
+       protected void initContactManager () throws SQLException {
                // Trace message
                this.getLogger().trace("CALLED!"); //NOI18N
                
index dd7eee810cd87df5556f12666d8791dd0fb293eb..6b08d12d5f7f0fff74ba6d5208edfa5fc972b002 100644 (file)
@@ -36,10 +36,7 @@ import org.mxchange.addressbook.menu.item.console.ConsoleMenuItem;
 import org.mxchange.jcore.application.Application;
 import org.mxchange.jcore.contact.Contact;
 import org.mxchange.jcore.contact.gender.Gender;
-import org.mxchange.jcore.exceptions.BadTokenException;
-import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
 import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
-import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
 
 /**
  * A client for the console
@@ -396,7 +393,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                                        // TODO throw own exception
                                        throw new UnhandledUserChoiceException(MessageFormat.format("Choice '{0}' not handled yet.", choice)); //NOI18N
                        }
-               } catch (final IOException | BadTokenException | CorruptedDatabaseFileException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+               } catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
                        // Something bad happened
                        this.abortProgramWithException(ex);
                }
@@ -575,7 +572,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                // Init contact manager here
                try {
                        this.initContactManager();
-               } catch (final UnsupportedDatabaseBackendException | SQLException ex) {
+               } catch (final SQLException ex) {
                        // End here
                        this.abortProgramWithException(ex);
                }
index 8df0da35d37a9e39fcad164622fca865c7a9723a..7c85fc453cfe705423a3fecd71005d237b981f8b 100644 (file)
@@ -54,8 +54,6 @@ import org.mxchange.addressbook.manager.contact.ManageableAddressbookContact;
 import org.mxchange.jcore.client.Client;
 import org.mxchange.jcore.contact.Contact;
 import org.mxchange.jcore.contact.gender.Gender;
-import org.mxchange.jcore.exceptions.BadTokenException;
-import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
 import org.mxchange.jcore.exceptions.FrameAlreadyInitializedException;
 import org.mxchange.jswingcore.client.gui.ClientFrame;
 import org.mxchange.jswingcore.model.swing.contact.ContactTableModel;
@@ -212,7 +210,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
         * @param client Client instance
         */
        @Override
-       public void setupFrame (final Client client) throws IOException, BadTokenException {
+       public void setupFrame (final Client client) throws IOException {
                // Debug line
                this.getLogger().trace(MessageFormat.format("client={0}: CALLED!", client)); //NOI18N
 
@@ -681,7 +679,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                                        // Already added, log away
                                        // TODO maybe output message here?
                                        self.logException(ex);
-                               } catch (final IOException | BadTokenException ex) {
+                               } catch (final IOException ex) {
                                        // Somethind bad happened here
                                        // TODO Output error message here?
                                }
@@ -705,7 +703,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                        public void actionPerformed (final ActionEvent e) {
                                try {
                                        ((ManageableAddressbookContact) self.getClient().getManager()).doChangeOwnData();
-                               } catch (final IOException | BadTokenException | CorruptedDatabaseFileException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+                               } catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
                                        self.logException(ex);
                                }
                        }
index 09765d1dbc5fd75dec37e50b11b36a9aaf8dee84..b66b07c0030bd33fbac8976fe548d2f97b60b029 100644 (file)
@@ -25,10 +25,8 @@ import org.mxchange.addressbook.menu.item.SelectableMenuItem;
 import org.mxchange.jcore.application.Application;
 import org.mxchange.jcore.contact.Contact;
 import org.mxchange.jcore.contact.gender.Gender;
-import org.mxchange.jcore.exceptions.BadTokenException;
 import org.mxchange.jcore.exceptions.FrameAlreadyInitializedException;
 import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
-import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
 import org.mxchange.jswingcore.client.gui.ClientFrame;
 
 /**
@@ -190,7 +188,7 @@ public class SwingClient extends BaseAddressbookClient implements AddressbookCli
 
                        // Now start the frame
                        this.frame.setupFrame(this);
-               } catch (final FrameAlreadyInitializedException | UnsupportedDatabaseBackendException | IOException | BadTokenException | SQLException ex) {
+               } catch (final FrameAlreadyInitializedException | IOException | SQLException ex) {
                        // Abort program
                        this.abortProgramWithException(ex);
                }
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
 
index 9e12e7570da1b6c5021b3dc66453f0348de98f02..dccb8af7fc243d388e21902b58f3e3089fd56e03 100644 (file)
@@ -22,8 +22,6 @@ import java.sql.SQLException;
 import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
 import org.mxchange.jcore.contact.Contact;
 import org.mxchange.jcore.contact.gender.Gender;
-import org.mxchange.jcore.exceptions.BadTokenException;
-import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
 import org.mxchange.jcore.manager.database.ManageableDatabase;
 
 /**
@@ -180,13 +178,11 @@ public interface ManageableAddressbookContact extends ManageableDatabase {
         * Let the user change own data
         * @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?
         */
-       public void doChangeOwnData () throws IOException , BadTokenException, CorruptedDatabaseFileException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+       public void doChangeOwnData () throws IOException , SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
 
        /**
         * Let the user delete other address
@@ -197,9 +193,8 @@ public interface ManageableAddressbookContact extends ManageableDatabase {
         * Asks user for own data
         * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If own contact is already added
         * @throws java.io.IOException If an IO error was found
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
         */
-       public void doEnterOwnData () throws ContactAlreadyAddedException, IOException , BadTokenException;
+       public void doEnterOwnData () throws ContactAlreadyAddedException, IOException;
 
        /**
         * Searches address book for a contact
@@ -212,7 +207,6 @@ public interface ManageableAddressbookContact extends ManageableDatabase {
         *
         * @return Whether own contact is already added
         * @throws java.io.IOException If an IO error occurs
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
         */
-       public boolean isOwnContactAdded () throws IOException, BadTokenException;
+       public boolean isOwnContactAdded () throws IOException;
 }