]> git.mxchange.org Git - pizzaservice-lib.git/commitdiff
More cleanup from TDGP
authorRoland Haeder <roland@mxchange.org>
Fri, 4 Sep 2015 15:03:57 +0000 (17:03 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 4 Sep 2015 15:03:57 +0000 (17:03 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/pizzaapplication/application/PizzaApplication.java
src/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java

index c94016592acf06d8ffaf540990ee3b44d817bff5..53ec1d4f8aae29953393cba86672e9b902f9ad19 100644 (file)
@@ -22,9 +22,6 @@ import java.sql.SQLException;
 import java.util.Deque;
 import java.util.Iterator;
 import org.mxchange.jcore.application.Application;
-import org.mxchange.jcore.exceptions.BadTokenException;
-import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
-import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
 import org.mxchange.jshop.category.Category;
 import org.mxchange.jshop.exceptions.CategoryTitleAlreadyUsedException;
 import org.mxchange.jshop.exceptions.ProductTitleAlreadyUsedException;
@@ -45,10 +42,8 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         */
-       public Deque<Product> getAvailableProducts () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+       public Deque<Product> getAvailableProducts () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
 
        /**
         * Some "getter" for a linked list of all products
@@ -59,10 +54,8 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         */
-       public Deque<Product> getAllProducts () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+       public Deque<Product> getAllProducts () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
 
        /**
         * Some "getter" for a linked list of all categories
@@ -73,20 +66,16 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         */
-       public Deque<Category> getAllCategories () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+       public Deque<Category> getAllCategories () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
 
        /**
         * Initializes this instance with given ServletContext
         *
-        * @throws org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException If the backend is unsupported
         * @throws java.sql.SQLException If an SQL error occurs
         * @throws java.io.IOException If an IO error occurs
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
         */
-       public void init () throws UnsupportedDatabaseBackendException, SQLException, IOException, BadTokenException;
+       public void init () throws SQLException, IOException;
 
        /**
         * Some "getter" for a an array of only available products
@@ -97,10 +86,8 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         */
-       public Iterator<Product> getAvailableProductsIterator () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+       public Iterator<Product> getAvailableProductsIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
 
        /**
         * Some "getter" for a an array of all products
@@ -111,10 +98,8 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         */
-       public Iterator<Product> getAllProductsIterator () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+       public Iterator<Product> getAllProductsIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
 
        /**
         * Some "getter" for a an array of all categories
@@ -125,10 +110,8 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         */
-       public Iterator<Category> getAllCategoriesIterator () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+       public Iterator<Category> getAllCategoriesIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
 
        /**
         * Generates a link for category's parent category. If none is given, the method will return only a small
@@ -162,12 +145,10 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         * @deprecated Old lost code
         */
        @Deprecated
-       public String getPrintableProductCategory (final Product product) throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+       public String getPrintableProductCategory (final Product product) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
 
        /**
         * Adds given category data from request to database
@@ -179,10 +160,8 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         */
-       public void doAdminAddCategory (final Category category) throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, CategoryTitleAlreadyUsedException;
+       public void doAdminAddCategory (final Category category) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, CategoryTitleAlreadyUsedException;
 
        /**
         * Adds given product data from request to database
@@ -193,11 +172,9 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         * @throws org.mxchange.jshop.exceptions.ProductTitleAlreadyUsedException If the product's title is already used
         */
-       public void doAdminAddProduct (final Product product) throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ProductTitleAlreadyUsedException;
+       public void doAdminAddProduct (final Product product) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ProductTitleAlreadyUsedException;
 
        /**
         * Handles admin product form requests
@@ -207,13 +184,11 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         * @throws org.mxchange.jshop.exceptions.ProductTitleAlreadyUsedException If the product's title is already used
         * @deprecated Old lost code
         */
        @Deprecated
-       public void doAdminHandleProductForms () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ProductTitleAlreadyUsedException;
+       public void doAdminHandleProductForms () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ProductTitleAlreadyUsedException;
 
        /**
         * Handles admin category form requests
@@ -223,13 +198,11 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         * @throws org.mxchange.jshop.exceptions.CategoryTitleAlreadyUsedException The category's title is already used
         * @deprecated Old lost code
         */
        @Deprecated
-       public void doAdminHandleCategoryForms () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, CategoryTitleAlreadyUsedException;
+       public void doAdminHandleCategoryForms () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, CategoryTitleAlreadyUsedException;
 
        /**
         * Some "getter" for a Product instance from given item
@@ -241,8 +214,6 @@ public interface PizzaApplication extends Application {
         * @throws java.lang.NoSuchMethodException If a method was not found
         * @throws java.lang.IllegalAccessException If the method cannot be accessed publicly
         * @throws java.lang.reflect.InvocationTargetException If something else happens?
-        * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
-        * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged
         */
-       public Product getProduct (final AddableBasketItem item) throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
+       public Product getProduct (final AddableBasketItem item) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
 }
index 25fc401865f7312f89fee9348e14b8914fb29846..cb72f90bb14e8a79565d9bd0fc655709f6bae0b9 100644 (file)
@@ -22,9 +22,6 @@ import java.sql.SQLException;
 import java.text.MessageFormat;
 import java.util.Deque;
 import java.util.Iterator;
-import org.mxchange.jcore.exceptions.BadTokenException;
-import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
-import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
 import org.mxchange.jshop.category.Category;
 import org.mxchange.jshop.database.frontend.category.CategoryDatabaseFrontend;
 import org.mxchange.jshop.database.frontend.category.CategoryFrontend;
@@ -61,25 +58,25 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
        }
 
        @Override
-       public Deque<Category> getAllCategories () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+       public Deque<Category> getAllCategories () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Deligate to frontend
                return this.categoryFrontend.getAllCategories();
        }
 
        @Override
-       public Deque<Product> getAllProducts () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+       public Deque<Product> getAllProducts () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Deligate to frontend
                return this.productFrontend.getAllProducts();
        }
 
        @Override
-       public Deque<Product> getAvailableProducts () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+       public Deque<Product> getAvailableProducts () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Deligate to frontend
                return this.productFrontend.getAllAvailableProducts();
        }
 
        @Override
-       public void init () throws UnsupportedDatabaseBackendException, SQLException {
+       public void init () throws SQLException {
                // Trace message
                this.getLogger().trace("CALLED!"); //NOI18N
 
@@ -136,7 +133,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
 
        @Override
        @SuppressWarnings ("unchecked")
-       public Iterator<Product> getAvailableProductsIterator () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+       public Iterator<Product> getAvailableProductsIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // categoryFrontend must be set
                if (null == this.productFrontend) {
                        // Abort here
@@ -149,7 +146,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
 
        @Override
        @SuppressWarnings ("unchecked")
-       public Iterator<Product> getAllProductsIterator () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+       public Iterator<Product> getAllProductsIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Trace message
                this.getLogger().trace("CALLED!"); //NOI18N
 
@@ -165,7 +162,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
 
        @Override
        @SuppressWarnings ("unchecked")
-       public Iterator<Category> getAllCategoriesIterator () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+       public Iterator<Category> getAllCategoriesIterator () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Trace message
                this.getLogger().trace("CALLED!"); //NOI18N
 
@@ -182,7 +179,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
        /**
         * Initializes database frontends.
         */
-       private void initDatabaseFrontends () throws UnsupportedDatabaseBackendException, SQLException {
+       private void initDatabaseFrontends () throws SQLException {
                // Trace message
                this.getLogger().trace("CALLED!"); //NOI18N
 
@@ -202,7 +199,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
         * @param category Category instance
         * @return Whether it has been found
         */
-       private boolean isCategoryTitleUsed(final Category category) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+       private boolean isCategoryTitleUsed(final Category category) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
                // categoryFrontend must be set
                if (null == this.categoryFrontend) {
                        // Abort here
@@ -218,7 +215,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
         * @param title Product title to check
         * @return Whether the product title has already been used
         */
-       private boolean isProductTitleUsed (final String title) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+       private boolean isProductTitleUsed (final String title) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
                // categoryFrontend must be set
                if (null == this.productFrontend) {
                        // Abort here
@@ -230,7 +227,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
        }
 
        @Override
-       public void doAdminAddCategory (final Category category) throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, CategoryTitleAlreadyUsedException {
+       public void doAdminAddCategory (final Category category) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, CategoryTitleAlreadyUsedException {
                // Trace message
                this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N
 
@@ -273,7 +270,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
        }
 
        @Override
-       public void doAdminAddProduct (final Product product) throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ProductTitleAlreadyUsedException {
+       public void doAdminAddProduct (final Product product) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ProductTitleAlreadyUsedException {
                // Trace message
                this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
 
@@ -350,7 +347,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
 
        @Override
        @Deprecated
-       public String getPrintableProductCategory (final Product product) throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+       public String getPrintableProductCategory (final Product product) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Trace message
                this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
 
@@ -392,7 +389,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
         * @throws java.lang.IllegalAccessException If the method cannot be accessed
         * @throws java.lang.reflect.InvocationTargetException Any other problems?
         */
-       private boolean isProductTitleUsed (final Product product) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+       private boolean isProductTitleUsed (final Product product) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
                // Trace message
                this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
 
@@ -425,20 +422,20 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
 
        @Override
        @Deprecated
-       public void doAdminHandleProductForms () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ProductTitleAlreadyUsedException {
+       public void doAdminHandleProductForms () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ProductTitleAlreadyUsedException {
                // Deprecated method called
                throw new UnsupportedOperationException("Deprecated method has been called.");
        }
 
        @Override
        @Deprecated
-       public void doAdminHandleCategoryForms () throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, CategoryTitleAlreadyUsedException {
+       public void doAdminHandleCategoryForms () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, CategoryTitleAlreadyUsedException {
                // Deprecated method called
                throw new UnsupportedOperationException("Deprecated method has been called.");
        }
 
        @Override
-       public Product getProduct (final AddableBasketItem item) throws IOException, BadTokenException, SQLException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+       public Product getProduct (final AddableBasketItem item) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Trace message
                this.getLogger().trace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N