]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
More unused methods removed
authorRoland Haeder <roland@mxchange.org>
Mon, 31 Aug 2015 06:40:47 +0000 (08:40 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 31 Aug 2015 06:40:47 +0000 (08:40 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

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

index a542e56aab003a95cdef6b35805a0060c235465a..d3b98bea5372113c45e4ff205b2fd4c479d4e49c 100644 (file)
@@ -202,14 +202,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                return (String) object;
        }
 
-       /**
-        * Some "getter" for HTML code 'checked="checked"' if the product is choosen
-        * 
-        * @param product Product instance
-        * @param request Request instance
-        * @param session Session instance
-        * @return Whether the product is choosen
-        */
        @Override
        public String getCheckedHtmlFromProduct (final Product product, final HttpServletRequest request, final HttpSession session) {
                // Trace message
@@ -243,13 +235,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                }
        }
 
-       /**
-        * Some "getter" for HTML code 'disabled="disabled"' for e.g. submit buttons
-        *
-        * @param request Request instance
-        * @param session Session instance
-        * @return Whether the product is choosen
-        */
        @Override
        public String getDisabledHtmlFromSession (final HttpServletRequest request, final HttpSession session) throws ServletException {
                // Trace message
@@ -286,13 +271,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                }
        }
 
-       /**
-        * Checks if given Product instance is available and returns a printable
-        * (human-readable) string.
-        * 
-        * @param product Product instance to check
-        * @return Human-readable version of product availability
-        */
        @Override
        public String getPrintableProduktAvailability (final Product product) {
                // Trace message
@@ -314,11 +292,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                }
        }
 
-       /**
-        * Some "getter" for a an array of only available products
-        *
-        * @return All products
-        */
        @Override
        public Iterator<Product> getAvailableProducts () throws ServletException {
                // categoryFrontend must be set
@@ -335,11 +308,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                }
        }
 
-       /**
-        * Some "getter" for a an array of all products
-        *
-        * @return All products
-        */
        @Override
        public Iterator<Product> getAllProducts () throws ServletException {
                // Trace message
@@ -359,11 +327,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                }
        }
 
-       /**
-        * Some "getter" for a an array of all categories
-        *
-        * @return All categories
-        */
        @Override
        public Iterator<Category> getAllCategories () throws ServletException {
                // Trace message
@@ -383,27 +346,12 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                }
        }
 
-       /**
-        * Checks whether the given product is choosen, request overules session.
-        *
-        * @param product Product instance
-        * @param request Request instance
-        * @param session Session instance
-        * @return Whether the product is choosen
-        */
        @Override
        @Deprecated
        public boolean isProductChoosen (final Product product, final HttpServletRequest request, final HttpSession session) {
                throw new UnsupportedOperationException("This method is deprecated and shall not be called");
        }
 
-       /**
-        * Somewhat setter in session
-        *
-        * @param session Session instance
-        * @param key Session key to set
-        * @param value Value to set
-        */
        @Override
        public void setValueInSession (final HttpSession session, final String key, final Object value) {
                // Trace message
@@ -418,25 +366,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                this.getLogger().trace("EXIT!"); //NOI18N
        }
 
-       /**
-        * Clears given parameter for product in session
-        *
-        * @param product Product instance
-        * @param session Session instance
-        * @param parameter Parameter to clear
-        */
-       private void clearSessionAttribute (final Product product, final HttpSession session, final String parameter) {
-               // Trace message
-               this.getLogger().trace(MessageFormat.format("produce={0},parameter={1},session={2} - CALLED!", product, parameter, session)); //NOI18N
-
-               // Clear in session
-               this.getLogger().debug(MessageFormat.format("Clearing product={0},parameter={1} ...", product.getItemId(), parameter)); //NOI18N
-               this.setValueInSession(product, session, parameter, null);
-
-               // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
-       }
-
        /**
         * Some getter for value from session
         *
@@ -444,7 +373,9 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
         * @param session Session instance
         * @param attribute Attribute to get value from
         * @return Value from session
+        * @deprecated 
         */
+       @Deprecated
        private Object getValueFromSession (final Product product, final HttpSession session, final String attribute) {
                // Trace message
                this.getLogger().trace(MessageFormat.format("product={0},session={1},attribute={2} - CALLED!", product, session, attribute)); //NOI18N
@@ -537,50 +468,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                return this.productFrontend.isProductTitleUsed(title);
        }
 
-       /**
-        * Checks if the product ordered?
-        *
-        * @param product Product instance
-        * @param session HttpSession instance
-        * @return Whether the product has been ordered
-        */
-       private boolean isProductOrdered (final Product product, final HttpSession session) {
-               // Trace message
-               this.getLogger().trace(MessageFormat.format("product={0},session={1} - CALLED!", product, session)); //NOI18N
-
-               // Get session
-               Object isOrdered = this.getValueFromSession(product, session, SESSION_ORDERED);
-               this.getLogger().debug(MessageFormat.format("product={0},isOrdered={1}", product.getItemId(), isOrdered)); //NOI18N
-
-               // Return result
-               return ("true".equals(isOrdered)); //NOI18N
-       }
-
-       /**
-        * Somewhat setter in session
-        *
-        * @param product Product instance
-        * @param session Session instance
-        * @param keyPart Key part to include in final key
-        * @param value Value to set
-        */
-       private void setValueInSession (final Product product, final HttpSession session, final String keyPart, final Object value) {
-               // Trace message
-               this.getLogger().trace(MessageFormat.format("product={0},session={1},keyPart={2},value={3} - CALLED!", product, session, keyPart, value)); //NOI18N
-
-               // Set it synced
-               this.getLogger().debug(MessageFormat.format("Setting value={0} for product={1},keyPart={2}", value, product.getItemId(), keyPart)); //NOI18N
-               this.setValueInSession(session, String.format(HTTP_PARAM_MASK, keyPart, product.getItemId()), value);
-
-               // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
-       }
-
-       /**
-        * Adds given category data from request to database
-        *
-        * @param request Request instance
-        */
        @Override
        public void doAdminAddCategory (final HttpServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException {
                // Trace message
@@ -641,11 +528,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                this.getLogger().trace("EXIT!"); //NOI18N
        }
 
-       /**
-        * Adds given product data from request to database
-        *
-        * @param request Request instance
-        */
        @Override
        public void doAdminAddProduct (final HttpServletRequest request) throws ServletException, ProductTitleAlreadyUsedException {
                // Trace message
@@ -735,13 +617,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                this.getLogger().trace("EXIT!"); //NOI18N
        }
 
-       /**
-        * Generates link HTML code for given category's parent id, if set. This
-        * link then points to products.jsp?category_id=x
-        *
-        * @param category Category instance
-        * @return HTML code
-        */
        @Override
        public String generateLinkForParent (final Category category) {
                // Trace message
@@ -848,12 +723,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                return isUsed;
        }
 
-       /**
-        * Handles admin form requests
-        * @param request Request instance
-        * @param response Response instance
-        * @throws ServletException If something unexpected happened
-        */
        @Override
        public void doAdminHandleProductForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException {
                // Trace message
@@ -904,12 +773,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                this.getLogger().trace("EXIT!"); //NOI18N
        }
 
-       /**
-        * Handles admin form requests
-        * @param request Request instance
-        * @param response Response instance
-        * @throws ServletException If something unexpected happened
-        */
        @Override
        public void doAdminHandleCategoryForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException {
                // Trace message