]> git.mxchange.org Git - pizzaservice-swing.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Thu, 24 Sep 2015 13:21:31 +0000 (15:21 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 24 Sep 2015 13:21:31 +0000 (15:21 +0200)
- auto-reformatted many files
- updated jars
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jcore.jar
lib/jcoreee.jar
lib/jshop-core.jar
lib/jshop-ee-lib.jar
lib/jswingcore.jar
src/org/mxchange/pizzaapplication/application/PizzaApplication.java
src/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java

index 57dc0a07e9ad739e6f82121851bb5ecdf7291de2..c0bdbee1e02a1d6bf6ef6af3c07a3bd7c43e06fe 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index 884b0d96ea6bf9165d0544762c053be8168aa340..d550fe018c1a514bef85d93ba1e622042048b6e6 100644 (file)
Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ
index 90365fe70f990fc5a9e3fae53e46f57c1d9163a5..3e77fa799e8b8ef8e53f83888d9832a67c5aa1b1 100644 (file)
Binary files a/lib/jshop-core.jar and b/lib/jshop-core.jar differ
index deaa0afb02ad1cf83efb7868e15b8f70c4236913..287302188b7c28bb7c37d5345bad592da56eb884 100644 (file)
Binary files a/lib/jshop-ee-lib.jar and b/lib/jshop-ee-lib.jar differ
index 15d1d735f377162535071a9b3efb699955973796..0525b1a54b917c45cab696b4bdabf3e6df491a9e 100644 (file)
Binary files a/lib/jswingcore.jar and b/lib/jswingcore.jar differ
index 5fe0ae6b7cc69c81b08cf3ee43698e3e95c67756..dcd825b1d5f05568742ba399308f3032346d494b 100644 (file)
@@ -31,19 +31,22 @@ import org.mxchange.jshopcore.model.product.Product;
  * @author Roland Haeder<roland@mxchange.org>
  */
 public interface PizzaApplication extends Application {
+
        /**
-        * Some "getter" for a linked list of only available products
-        * 
-        * @return Only available products
+        * Adds given category data from request to database
+        *
+        * @param category Category instance
+        * @throws org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException If the category's title has been used
         */
-       public Deque<Product> getAvailableProducts ();
+       public void doAdminAddCategory (final Category category) throws CategoryTitleAlreadyUsedException;
 
        /**
-        * Some "getter" for a linked list of all products
+        * Adds given product data from request to database
         *
-        * @return All products
+        * @param product Product instance
+        * @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the     * product's title has been used
         */
-       public Deque<Product> getAllProducts ();
+       public void doAdminAddProduct (final Product product) throws ProductTitleAlreadyUsedException;
 
        /**
         * Some "getter" for a linked list of all categories
@@ -53,19 +56,18 @@ public interface PizzaApplication extends Application {
        public Deque<Category> getAllCategories ();
 
        /**
-        * Initializes this instance with given ServletContext
+        * Some "getter" for a an array of all categories
         *
-        * @throws java.sql.SQLException If an SQL error occurs
-        * @throws java.io.IOException If an IO error occurs
+        * @return All categories
         */
-       public void init () throws SQLException, IOException;
+       public Iterator<Category> getAllCategoriesIterator ();
 
        /**
-        * Some "getter" for a an array of only available products
-        * 
-        * @return Only available products
+        * Some "getter" for a linked list of all products
+        *
+        * @return All products
         */
-       public Iterator<Product> getAvailableProductsIterator ();
+       public Deque<Product> getAllProducts ();
 
        /**
         * Some "getter" for a an array of all products
@@ -75,25 +77,24 @@ public interface PizzaApplication extends Application {
        public Iterator<Product> getAllProductsIterator ();
 
        /**
-        * Some "getter" for a an array of all categories
+        * Some "getter" for a linked list of only available products
         *
-        * @return All categories
+        * @return Only available products
         */
-       public Iterator<Category> getAllCategoriesIterator ();
+       public Deque<Product> getAvailableProducts ();
 
        /**
-        * Adds given category data from request to database
+        * Some "getter" for a an array of only available products
         *
-        * @param category Category instance
-        * @throws org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException If the category's title has been used
+        * @return Only available products
         */
-       public void doAdminAddCategory (final Category category) throws CategoryTitleAlreadyUsedException;
+       public Iterator<Product> getAvailableProductsIterator ();
 
        /**
-        * Adds given product data from request to database
+        * Initializes this instance with given ServletContext
         *
-        * @param product Product instance
-        * @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the product's title has been used
+        * @throws java.sql.SQLException If an SQL error occurs
+        * @throws java.io.IOException If an IO error occurs
         */
-       public void doAdminAddProduct (final Product product) throws ProductTitleAlreadyUsedException;
+       public void init () throws SQLException, IOException;
 }
index 235f307663bccb3b32fd53dcc4385fa03fdfd383..72abe7162cf3c2e53de614b1e337aeb41522f560 100644 (file)
@@ -32,6 +32,7 @@ import org.mxchange.jshopcore.model.product.Product;
  * @author Roland Haeder<roland@mxchange.org>
  */
 public class PizzaServiceApplication extends BaseFrameworkSystem implements PizzaApplication {
+
        /**
         * Default constructor
         */
@@ -40,99 +41,6 @@ public class PizzaServiceApplication extends BaseFrameworkSystem implements Pizz
                this.getLogger().trace("CALLED!"); //NOI18N
        }
 
-       @Override
-       public Deque<Category> getAllCategories () {
-               // Unfinished
-               throw new UnsupportedOperationException("Unfinished method.");
-       }
-
-       @Override
-       public Deque<Product> getAllProducts () {
-               // Unfinished
-               throw new UnsupportedOperationException("Unfinished method.");
-       }
-
-       @Override
-       public Deque<Product> getAvailableProducts () {
-               // Unfinished
-               throw new UnsupportedOperationException("Unfinished method.");
-       }
-
-       @Override
-       public void init () throws SQLException {
-               // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
-
-               // Is the bundle initialized?
-               if (!BaseFrameworkSystem.isBundledInitialized()) {
-                       // Temporary initialize default bundle
-                       // TODO The enum Gender uses this
-                       this.initBundle();
-               }
-
-               // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
-       }
-
-       @Override
-       public void doBootstrap () {
-               throw new UnsupportedOperationException("Not supported yet."); //NOI18N
-       }
-
-       @Override
-       public void doMainLoop () {
-               throw new UnsupportedOperationException("Not supported yet."); //NOI18N
-       }
-
-       @Override
-       public void doShutdown () {
-               throw new UnsupportedOperationException("Not supported yet."); //NOI18N
-       }
-
-       @Override
-       @SuppressWarnings ("unchecked")
-       public Iterator<Product> getAvailableProductsIterator () {
-               // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
-
-               // Unfinished
-               throw new UnsupportedOperationException("Unfinished method.");
-       }
-
-       @Override
-       @SuppressWarnings ("unchecked")
-       public Iterator<Product> getAllProductsIterator () {
-               // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
-
-               // Unfinished
-               throw new UnsupportedOperationException("Unfinished method.");
-       }
-
-       @Override
-       @SuppressWarnings ("unchecked")
-       public Iterator<Category> getAllCategoriesIterator () {
-               // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
-
-               // Unfinished
-               throw new UnsupportedOperationException("Unfinished method.");
-       }
-
-       /**
-        * Checks whether given category title is already used
-        *
-        * @param title Title of category to check
-        * @return Whether it has been found
-        */
-       private boolean isCategoryTitleUsed(final String title) {
-               // Trace message
-               this.getLogger().trace(MessageFormat.format("title={0} - CALLED!", title)); //NOI18N
-
-               // Unfinished
-               throw new UnsupportedOperationException("Unfinished method.");
-       }
-
        @Override
        public void doAdminAddCategory (final Category category) throws CategoryTitleAlreadyUsedException {
                // Trace message
@@ -146,10 +54,10 @@ public class PizzaServiceApplication extends BaseFrameworkSystem implements Pizz
 
                // Get all fields
                String title = category.getTitle();
-               Long parentId = category.getParentId();
+               Category parentCategory = category.getParentCategory();
 
                // Debug message
-               this.getLogger().debug(MessageFormat.format("title={0},parentId={1}", title, parentId)); //NOI18N
+               this.getLogger().debug(MessageFormat.format("title={0},parentCategory={1}", title, parentCategory)); //NOI18N
 
                // Init variables for casting
                Integer id = 0;
@@ -161,9 +69,9 @@ public class PizzaServiceApplication extends BaseFrameworkSystem implements Pizz
                } else if (title.isEmpty()) {
                        // Is left empty
                        throw new IllegalArgumentException("title is empty."); //NOI18N
-               } else if ((parentId == null) || (parentId == 0)) {
+               } else if (null == parentCategory) {
                        // Is left empty
-                       throw new IllegalArgumentException("parentId is empty."); //NOI18N
+                       throw new IllegalArgumentException("parentCategory is null."); //NOI18N
                }
 
                // Try to check if title is used already
@@ -233,74 +141,167 @@ public class PizzaServiceApplication extends BaseFrameworkSystem implements Pizz
                //this.getLogger().trace("EXIT!"); //NOI18N
        }
 
+       @Override
+       public void doBootstrap () {
+               throw new UnsupportedOperationException("Not supported yet."); //NOI18N
+       }
+
+       @Override
+       public void doMainLoop () {
+               throw new UnsupportedOperationException("Not supported yet."); //NOI18N
+       }
+
+       @Override
+       public void doShutdown () {
+               throw new UnsupportedOperationException("Not supported yet."); //NOI18N
+       }
+
+       @Override
+       public Deque<Category> getAllCategories () {
+               // Unfinished
+               throw new UnsupportedOperationException("Unfinished method.");
+       }
+
+       @Override
+       @SuppressWarnings ("unchecked")
+       public Iterator<Category> getAllCategoriesIterator () {
+               // Trace message
+               this.getLogger().trace("CALLED!"); //NOI18N
+
+               // Unfinished
+               throw new UnsupportedOperationException("Unfinished method.");
+       }
+
+       @Override
+       public Deque<Product> getAllProducts () {
+               // Unfinished
+               throw new UnsupportedOperationException("Unfinished method.");
+       }
+
+       @Override
+       @SuppressWarnings ("unchecked")
+       public Iterator<Product> getAllProductsIterator () {
+               // Trace message
+               this.getLogger().trace("CALLED!"); //NOI18N
+
+               // Unfinished
+               throw new UnsupportedOperationException("Unfinished method.");
+       }
+
+       @Override
+       public Deque<Product> getAvailableProducts () {
+               // Unfinished
+               throw new UnsupportedOperationException("Unfinished method.");
+       }
+
+       @Override
+       @SuppressWarnings ("unchecked")
+       public Iterator<Product> getAvailableProductsIterator () {
+               // Trace message
+               this.getLogger().trace("CALLED!"); //NOI18N
+
+               // Unfinished
+               throw new UnsupportedOperationException("Unfinished method.");
+       }
+
+       @Override
+       public void init () throws SQLException {
+               // Trace message
+               this.getLogger().trace("CALLED!"); //NOI18N
+
+               // Is the bundle initialized?
+               if (!BaseFrameworkSystem.isBundledInitialized()) {
+                       // Temporary initialize default bundle
+                       // TODO The enum Gender uses this
+                       this.initBundle();
+               }
+
+               // Trace message
+               this.getLogger().trace("EXIT!"); //NOI18N
+       }
+
        /**
-        * Checks if product's title is already used.
-        * 
-        * @param product Product instance
+        * Checks whether given category title is already used
+        *
+        * @param title Title of category to check
+        * @return Whether it has been found
+        */
+       private boolean isCategoryTitleUsed (final String title) {
+               // Trace message
+               this.getLogger().trace(MessageFormat.format("title={0} - CALLED!", title)); //NOI18N
+
+               // Unfinished
+               throw new UnsupportedOperationException("Unfinished method.");
+       }
+
+       /**
+        * Checks if category's title is already used.
+        *
+        * @param category Category instance
         * @return Whether the product title is already used
         */
-       private boolean isProductTitleUsed (final Product product) {
+       private boolean isCategoryTitleUsed (final Category category) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", product)); //NOI18N
+               this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N
 
                // Init title
-               String title = product.getTitle();
+               String title = category.getTitle();
 
                // category must not be null and "title" must be found and non-empty
-               if (null == product) {
+               if (null == category) {
                        // Abort here
                        throw new NullPointerException("category is null"); //NOI18N
                } else if (null == title) {
                        // title is not set
-                       throw new IllegalArgumentException("product title is not set"); //NOI18N
+                       throw new IllegalArgumentException("category title is not set."); //NOI18N
                } else if (title.isEmpty()) {
                        // Is left empty
-                       throw new IllegalArgumentException("product title is empty"); //NOI18N
+                       throw new IllegalArgumentException("category title is empty."); //NOI18N
                }
 
                // Default is not used
-               // TODO Call backend
-               throw new UnsupportedOperationException("not finished yet.");
+               boolean isUsed = this.isCategoryTitleUsed(title);
 
                // Trace message
-               //this.getLogger().trace(MessageFormat.format("isUsed={0} - EXIT!", isUsed)); //NOI18N
+               this.getLogger().trace(MessageFormat.format("isUsed={0} - EXIT!", isUsed)); //NOI18N
 
                // Return it
-               //return isUsed;
+               return isUsed;
        }
 
        /**
-        * Checks if category's title is already used.
-        * 
-        * @param category Category instance
+        * Checks if product's title is already used.
+        *
+        * @param product Product instance
         * @return Whether the product title is already used
         */
-       private boolean isCategoryTitleUsed (final Category category) {
+       private boolean isProductTitleUsed (final Product product) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N
+               this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", product)); //NOI18N
 
                // Init title
-               String title = category.getTitle();
+               String title = product.getTitle();
 
                // category must not be null and "title" must be found and non-empty
-               if (null == category) {
+               if (null == product) {
                        // Abort here
                        throw new NullPointerException("category is null"); //NOI18N
                } else if (null == title) {
                        // title is not set
-                       throw new IllegalArgumentException("category title is not set."); //NOI18N
+                       throw new IllegalArgumentException("product title is not set"); //NOI18N
                } else if (title.isEmpty()) {
                        // Is left empty
-                       throw new IllegalArgumentException("category title is empty."); //NOI18N
+                       throw new IllegalArgumentException("product title is empty"); //NOI18N
                }
 
                // Default is not used
-               boolean isUsed = this.isCategoryTitleUsed(title);
+               // TODO Call backend
+               throw new UnsupportedOperationException("not finished yet.");
 
                // Trace message
-               this.getLogger().trace(MessageFormat.format("isUsed={0} - EXIT!", isUsed)); //NOI18N
+               //this.getLogger().trace(MessageFormat.format("isUsed={0} - EXIT!", isUsed)); //NOI18N
 
                // Return it
-               return isUsed;
+               //return isUsed;
        }
 }