From: Roland Haeder Date: Fri, 28 Aug 2015 20:53:12 +0000 (+0200) Subject: Removed already no longer used methods and cleared some which you should really not... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c58c9309f5ceb0790d75b4c02d3a18bb759dd68c;p=pizzaservice-war.git Removed already no longer used methods and cleared some which you should really not use (old way of handling orders) + fixed some packages Signed-off-by:Roland Häder --- diff --git a/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java b/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java index 738ac7b0..a5483c4d 100644 --- a/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java +++ b/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java @@ -87,30 +87,6 @@ public interface PizzaApplication extends Application { @Deprecated public String getChooseFromSession (final Product product, final HttpSession session); - /** - * Handler for amount from session - * - * @param product Product instance - * @param request Request instance - * @param session Session instance - * @return Amount as string - * @deprecated Old code - */ - @Deprecated - public String handleAmountFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session); - - /** - * Some "getter" for printable choosen (checkbox) from request or session - * - * @param product Product instance - * @param request Request instance - * @param session Session instance - * @return Amount as string - * @deprecated Old code - */ - @Deprecated - public String getPrintableChoosenFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session); - /** * Some "getter" for total price of position from request or session. * Single price and amount is multiplyed. @@ -164,7 +140,9 @@ public interface PizzaApplication extends Application { * @param session Session instance * @return Total amount of all choosen products * @throws javax.servlet.ServletException If something unexpected happened + * @deprecated Old lost code */ + @Deprecated public int calculateTotalAmount (final HttpServletRequest request, final HttpSession session) throws ServletException; /** @@ -187,46 +165,6 @@ public interface PizzaApplication extends Application { */ public String getDisabledHtmlFromSession (final HttpServletRequest request, final HttpSession session) throws ServletException; - /** - * Marks given product as ordered in session - * - * @param product Product to mark as ordered - * @param session Session instance - * @deprecated Old code - */ - @Deprecated - public void markProductAsOrdered(final Product product, final HttpSession session); - - /** - * Marks given product as choosen in session - * - * @param product Product to mark as ordered - * @param session Session instance - * @deprecated Old code - */ - @Deprecated - public void markProductAsChoosen(final Product product, final HttpSession session); - - /** - * Unmarks given product as ordered in session - * - * @param product Product to unmark as ordered - * @param session Session instance - * @deprecated Old code - */ - @Deprecated - public void unmarkProductAsOrdered(final Product product, final HttpSession session); - - /** - * Unmarks given product as choosen in session - * - * @param product Product to unmark as choosen - * @param session Session instance - * @deprecated Old code - */ - @Deprecated - public void unmarkProductAsChoosen(final Product product, final HttpSession session); - /** * Some getter for printable value from session or an empty string for null. * @@ -287,23 +225,12 @@ public interface PizzaApplication extends Application { */ public String getPrintableProduktCategory (final Product product) throws ServletException; - /** - * Marks all choosen products as ordered - * - * @param request Request instance - * @param session Session instance - * @throws javax.servlet.ServletException If something unexpected happened - * @deprecated Old code - */ - @Deprecated - public void markAllChoosenProductsAsOrdered (final HttpServletRequest request, final HttpSession session) throws ServletException; - /** * Adds given category data from request to database * * @param request Request instance * @throws javax.servlet.ServletException If something unexpected happened - * @throws org.mxchange.pizzaapplication.exceptions.CategoryTitleAlreadyUsedException If the given title is already used + * @throws org.mxchange.jshop.exceptions.CategoryTitleAlreadyUsedException If the given title is already used */ public void doAdminAddCategory (final HttpServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException; @@ -312,7 +239,7 @@ public interface PizzaApplication extends Application { * * @param request Request instance * @throws javax.servlet.ServletException If something unexpected happened - * @throws org.mxchange.pizzaapplication.exceptions.ProductTitleAlreadyUsedException If the given product title is already used + * @throws org.mxchange.jshop.exceptions.ProductTitleAlreadyUsedException If the given product title is already used */ public void doAdminAddProduct (final HttpServletRequest request) throws ServletException, ProductTitleAlreadyUsedException; diff --git a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java index 373f9e97..6e8c4ba5 100644 --- a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java +++ b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java @@ -99,8 +99,10 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P * @param request Request instance * @param session Session instance * @return Total amount of all choosen products + * @deprecated Old lost code */ @Override + @Deprecated public int calculateTotalAmount (final HttpServletRequest request, final HttpSession session) throws ServletException { // Trace message this.getLogger().trace(MessageFormat.format("request={0},session={1} - CALLED!", request, session)); //NOI18N @@ -372,63 +374,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P } } - /** - * Some "getter" for choosen (checkbox) from session - * - * @param product Product instance - * @param request Request instance - * @param session Session instance - * @return Amount as string - */ - @Override - @Deprecated - public String getPrintableChoosenFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session) { - // Trace message - this.getLogger().trace(MessageFormat.format("product={0},request={1},session={2} - CALLED!", product, request, session)); //NOI18N - - // Is product and session set? - if (null == product) { - // Not set - throw new NullPointerException("product is null"); //NOI18N - } else if (null == request) { - // Not set - throw new NullPointerException("request is null"); //NOI18N - } else if (null == session) { - // Not set - throw new NullPointerException("session is null"); //NOI18N - } - - // Get element - this.getLogger().debug(MessageFormat.format("Calling handleChooseFromRequestSession({0},{1},{2}) ...", product.getItemId(), request, session)); //NOI18N - String choosen = this.handleChooseFromRequestSession(product, request, session); - this.getLogger().debug(MessageFormat.format("product={0},choosen={1}", product.getItemId(), choosen)); //NOI18N - - // Must not be null - assert(choosen instanceof String): "choosen is null"; //NOI18N - - // Is it empty? - if (choosen.isEmpty()) { - // Not choosen - return "Nein"; - } - - // Get amount - String amount = this.handleAmountFromRequestSession(product, request, session); - this.getLogger().debug(MessageFormat.format("product={0},amount={1}", product.getItemId(), amount)); //NOI18N - - // Must not be null - assert(amount instanceof String): "amount is null"; //NOI18N - - // Is it empty? - if (amount.isEmpty() || "0".equals(amount)) { //NOI18N - // Choosen, but no amount - return "Nein"; - } else { - // Is choosen - return "Ja"; - } - } - /** * Checks if given Product instance is available and returns a printable * (human-readable) string. @@ -572,138 +517,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P @Override @Deprecated public float getTotalPositionPriceFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session) { - // Trace message - this.getLogger().trace(MessageFormat.format("product={0},request={1},session={2} - CALLED!", product, request, session)); //NOI18N - - // Is product and session set? - if (null == product) { - // Not set - throw new NullPointerException("product is null"); //NOI18N - } else if (null == request) { - // Not set - throw new NullPointerException("request is null"); //NOI18N - } else if (null == session) { - // Not set - throw new NullPointerException("session is null"); //NOI18N - } - - // Get choosen - this.getLogger().debug(MessageFormat.format("Calling handleChooseFromRequestSession({0},{1},{2}) ...", product.getItemId(), request, session)); //NOI18N - String choosen = this.handleChooseFromRequestSession(product, request, session); - this.getLogger().debug(MessageFormat.format("product={0},choosen={1}", product.getItemId(), choosen)); //NOI18N - - // Must not be null - assert(choosen instanceof String): "choosen is null"; //NOI18N - - // Is it set? - if (choosen.isEmpty()) { - // Is empty - this.getLogger().debug(MessageFormat.format("product={0},choosen={1} - returning zero ...", product.getItemId(), choosen)); //NOI18N - return 0.00f; - } - - // Get amount - String amount = this.handleAmountFromRequestSession(product, request, session); - this.getLogger().debug(MessageFormat.format("product={0},amount={1}", product.getItemId(), amount)); //NOI18N - - // Must not be null - assert(amount instanceof String): "amount is null"; //NOI18N - - // Is it empty? - if (amount.isEmpty() || "0".equals(amount)) { //NOI18N - // Is empty - this.getLogger().debug(MessageFormat.format("product={0},amount={1} - returning zero ...", product.getItemId(), amount)); //NOI18N - return 0.00f; - } - - // Init variable - Integer value = null; - - // Try it - try { - // Get amount as integer - value = Integer.valueOf(amount); - } catch (final NumberFormatException e) { - // Bat input - throw new IllegalArgumentException(e); - } - - // Calculate price - float price = (product.getPrice() * value); - - // Trace message - this.getLogger().trace(MessageFormat.format("product={0},price={1} - EXIT!", product.getItemId(), price)); //NOI18N - - // Then multiply it with price - return price; - } - - /** - * Handler for amount from request or session - * - * @param product Product instance - * @param request Request instance - * @param session Session instance - * @return Amount as string - */ - @Override - @Deprecated - public String handleAmountFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session) { - // Trace message - this.getLogger().trace(MessageFormat.format("product={0},request={1},session={2} - CALLED!", product, request, session)); //NOI18N - - // Is product and session set? - if (null == product) { - // Not set - throw new NullPointerException("product is null"); //NOI18N - } else if (null == request) { - // Not set - throw new NullPointerException("request is null"); //NOI18N - } else if (null == session) { - // Not set - throw new NullPointerException("session is null"); //NOI18N - } - - // Init variabke - Object object; - - // Check request method - if (!"POST".equals(request.getMethod())) { //NOI18N - // Not POST, so get from session - return this.getAmountFromSession(product, session); - } else if (this.handleChooseFromRequestSession(product, request, session).isEmpty()) { - // Not choosen - this.clearSessionAttribute(product, session, HTTP_PARAM_AMOUNT); - this.getLogger().debug(MessageFormat.format("Unsetting for product={0} in session, returning zero ...", product.getItemId())); //NOI18N - return "0"; //NOI18N - } - - // Get attribute from request - object = request.getParameter(String.format(HTTP_PARAM_MASK, HTTP_PARAM_AMOUNT, product.getItemId())); - - // Is it set? - if (object instanceof String) { - // Try to parse it to integer - try { - Integer value = Integer.valueOf((String) object); - } catch (final NumberFormatException ex) { - // Not valid input - this.getLogger().warn(ex); - return "0"; //NOI18N - } - - // Then set it in session - this.setValueInSession(product, session, HTTP_PARAM_AMOUNT, object); - - // And return it - return (String) object; - } - - // Trace message - this.getLogger().trace("Calling getAmountFromSession() ..."); //NOI18N - - // Get attribute from session - return this.getAmountFromSession(product, session); + throw new UnsupportedOperationException("This method is deprecated and shall not be called."); } /** @@ -717,138 +531,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P @Override @Deprecated public boolean isProductChoosen (final Product product, final HttpServletRequest request, final HttpSession session) { - // Trace message - this.getLogger().trace(MessageFormat.format("product={0},request={1},session={2} - CALLED!", product, request, session)); //NOI18N - - // Is product and session set? - if (null == product) { - // Not set - throw new NullPointerException("product is null"); //NOI18N - } else if (null == request) { - // Not set - throw new NullPointerException("request is null"); //NOI18N - } else if (null == session) { - // Not set - throw new NullPointerException("session is null"); //NOI18N - } - - // Get choosen - this.getLogger().debug(MessageFormat.format("Calling handleChooseFromRequestSession({0},{1},{2}) ...", product.getItemId(), request, session)); //NOI18N - String choosen = this.handleChooseFromRequestSession(product, request, session); - this.getLogger().debug(MessageFormat.format("product={0},choosen={1}", product.getItemId(), choosen)); //NOI18N - - // Must not be null - assert(choosen instanceof String): "choosen is null"; //NOI18N - - // Is it not choosen? - if (choosen.isEmpty()) { - // Not choosen - return false; - } - - // Get amount - String amount = this.handleAmountFromRequestSession(product, request, session); - - // Must not be null - assert(amount instanceof String): "amount is not set"; //NOI18N - - // Trace message - this.getLogger().trace(MessageFormat.format("amount={0} - EXIT!", amount)); //NOI18N - - // Must not be empty and not 0 - return (!amount.isEmpty() && !"0".equals(amount)); //NOI18N - } - - /** - * Marks all choosen products as ordered - * - * @param request Request instance - * @param session Session instance - */ - @Override - @Deprecated - public void markAllChoosenProductsAsOrdered (final HttpServletRequest request, final HttpSession session) throws ServletException { - // Trace message - this.getLogger().trace(MessageFormat.format("request={0},session={1} - CALLED!", request, session)); //NOI18N - - // Init iterator - Iterator iterator = this.getAvailableProducts(); - - // "Walk" over all products - while (iterator.hasNext()) { - // Get next product - Product product = iterator.next(); - - // Debug message - this.getLogger().debug(MessageFormat.format("product={0}", product)); //NOI18N - - // Is it choosen? - if (this.isProductChoosen(product, request, session)) { - // Mark product as ordered - this.markProductAsOrdered(product, session); - } - } - - // Trace message - this.getLogger().trace("EXIT!"); //NOI18N - } - - /** - * Marks given product as choosen in session - * - * @param product Product to mark as ordered - * @param session Session instance - */ - @Override - @Deprecated - public void markProductAsChoosen (final Product product, final HttpSession session) { - // Trace message - this.getLogger().trace(MessageFormat.format("product={0},session={1} - CALLED!", product, session)); //NOI18N - - // Is product and session set? - if (null == product) { - // Not set - throw new NullPointerException("product is null"); //NOI18N - } else if (null == session) { - // Not set - throw new NullPointerException("session is null"); //NOI18N - } - - // Mark it as ordered by setting flag - this.getLogger().debug(MessageFormat.format("Marking product={0} as choosen.", product.getItemId())); //NOI18N - this.setValueInSession(product, session, HTTP_PARAM_ITEM_ID, "1"); //NOI18N - - // Trace message - this.getLogger().trace("EXIT!"); //NOI18N - } - - /** - * Marks given product as ordered in session - * - * @param product Product to mark as ordered - * @param session Session instance - */ - @Override - @Deprecated - public void markProductAsOrdered (final Product product, final HttpSession session) { - // Trace message - this.getLogger().trace(MessageFormat.format("product={0},session={1} - CALLED!", product, session)); //NOI18N - - // Is product and session set? - if (null == product) { - // Not set - throw new NullPointerException("product is null"); //NOI18N - } else if (null == session) { - // Not set - throw new NullPointerException("session is null"); //NOI18N - } - - // Mark it as ordered by setting flag - this.getLogger().debug(MessageFormat.format("Marking product={0} as ordered.", product.getItemId())); //NOI18N - this.setValueInSession(product, session, SESSION_ORDERED, "true"); //NOI18N - - // Trace message - this.getLogger().trace("EXIT!"); //NOI18N + throw new UnsupportedOperationException("This method is deprecated and shall not be called"); } /** @@ -872,64 +555,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P this.getLogger().trace("EXIT!"); //NOI18N } - /** - * Unmarks given product as choosen in session - * - * @param product Product to unmark as choosen - * @param session Session instance - */ - @Override - @Deprecated - public void unmarkProductAsChoosen (final Product product, final HttpSession session) { - // Trace message - this.getLogger().trace(MessageFormat.format("product={0},session={1} - CALLED!", product, session)); //NOI18N - - // Is product and session set? - if (null == product) { - // Not set - throw new NullPointerException("product is null"); //NOI18N - } else if (null == session) { - // Not set - throw new NullPointerException("session is null"); //NOI18N - } - - // Mark it as ordered by setting flag - this.getLogger().debug(MessageFormat.format("Unmarking product={0} as choosen.", product.getItemId())); //NOI18N - this.clearSessionAttribute(product, session, HTTP_PARAM_ITEM_ID); - - // Trace message - this.getLogger().trace("EXIT!"); //NOI18N - } - - /** - * Unmarks given product as ordered in session - * - * @param product Product to unmark as ordered - * @param session Session instance - */ - @Override - @Deprecated - public void unmarkProductAsOrdered (final Product product, final HttpSession session) { - // Trace message - this.getLogger().trace(MessageFormat.format("product={0},session={1} - CALLED!", product, session)); //NOI18N - - // Is product and session set? - if (null == product) { - // Not set - throw new NullPointerException("product is null"); //NOI18N - } else if (null == session) { - // Not set - throw new NullPointerException("session is null"); //NOI18N - } - - // Mark it as ordered by setting flag - this.getLogger().debug(MessageFormat.format("Unmarking product={0} as ordered.", product.getItemId())); //NOI18N - this.clearSessionAttribute(product, session, SESSION_ORDERED); - - // Trace message - this.getLogger().trace("EXIT!"); //NOI18N - } - /** * Clears given parameter for product in session * @@ -999,73 +624,6 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P return value; } - /** - * Handler for choosen (checkbox) from request or session - * - * @param product Product instance - * @param request Request instance - * @param session Session instance - * @return Amount as string - * @deprecated Old lost code - */ - @Deprecated - private String handleChooseFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session) { - // Trace message - this.getLogger().trace(MessageFormat.format("product={0},request={1},session={2} - CALLED!", product, request, session)); //NOI18N - - // Is product and session set? - if (null == product) { - // Not set - throw new NullPointerException("product is null"); //NOI18N - } else if (null == request) { - // Not set - throw new NullPointerException("request is null"); //NOI18N - } else if (null == session) { - // Not set - throw new NullPointerException("session is null"); //NOI18N - } - - // Init variabke - Object object; - - // Check request method - if (!"POST".equals(request.getMethod())) { //NOI18N - // Not POST, so get from session - this.getLogger().trace(MessageFormat.format("Calling this.getChooseFromSession({0},{1}) ... - EXIT!", product.getItemId(), session)); //NOI18N - return this.getChooseFromSession(product, session); - } else if (this.isProductOrdered(product, session)) { - // Product is ordered - this.getLogger().trace(MessageFormat.format("Calling this.getChooseFromSession({0},{1}) ... - EXIT!", product.getItemId(), session)); //NOI18N - return this.getChooseFromSession(product, session); - } else if (!this.getChooseFromSession(product, session).isEmpty()) { - // Found in session - this.getLogger().trace(MessageFormat.format("Calling this.getChooseFromSession({0},{1}) ... - EXIT!", product.getItemId(), session)); //NOI18N - return this.getChooseFromSession(product, session); - } - - // Get reqzest element - object = request.getParameter(String.format(HTTP_PARAM_MASK, HTTP_PARAM_ITEM_ID, product.getItemId())); - this.getLogger().debug(MessageFormat.format("product={0},object={1}", product.getItemId(), object)); //NOI18N - - // Is it null? - if (null == object) { - // Unset session - this.getLogger().debug(MessageFormat.format("Unsetting session for product={0} ...", product.getItemId())); //NOI18N - this.clearSessionAttribute(product, session, HTTP_PARAM_ITEM_ID); - this.clearSessionAttribute(product, session, HTTP_PARAM_AMOUNT); - - // Return empty string - return ""; //NOI18N - } - - // Then set it in session - this.setValueInSession(product, session, HTTP_PARAM_ITEM_ID, object); - - // Cast to string and return it - this.getLogger().debug(MessageFormat.format("product={0} - Returning {1} ...", product.getItemId(), object)); //NOI18N - return (String) object; - } - /** * Initializes database frontends. */ diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java index ce1e6dda..1608590f 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java @@ -59,30 +59,6 @@ public interface PizzaBean extends FrameworkBean { @Deprecated public String getChooseFromSession (final Product product, final HttpSession session); - /** - * Handler for amount from session - * - * @param product Product instance - * @param request Request instance - * @param session Session instance - * @return Amount as string - * @deprecated Old code - */ - @Deprecated - public String handleAmountFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session); - - /** - * Some "getter" for printable choosen (checkbox) from request or session - * - * @param product Product instance - * @param request Request instance - * @param session Session instance - * @return Amount as string - * @deprecated Old code - */ - @Deprecated - public String getPrintableChoosenFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session); - /** * Some "getter" for total price of position from request or session. * Single price and amount is multiplyed. @@ -130,7 +106,9 @@ public interface PizzaBean extends FrameworkBean { * @param session Session instance * @return Total amount of all choosen products * @throws javax.servlet.ServletException If something unexpected happened + * @deprecated Old lost code */ + @Deprecated public int calculateTotalAmount (final HttpServletRequest request, final HttpSession session) throws ServletException; /** @@ -153,46 +131,6 @@ public interface PizzaBean extends FrameworkBean { */ public String getDisabledHtmlFromSession (final HttpServletRequest request, final HttpSession session) throws ServletException; - /** - * Marks given product as ordered in session - * - * @param product Product to mark as ordered - * @param session Session instance - * @deprecated Old code - */ - @Deprecated - public void markProductAsOrdered(final Product product, final HttpSession session); - - /** - * Marks given product as choosen in session - * - * @param product Product to mark as ordered - * @param session Session instance - * @deprecated Old code - */ - @Deprecated - public void markProductAsChoosen(final Product product, final HttpSession session); - - /** - * Unmarks given product as ordered in session - * - * @param product Product to unmark as ordered - * @param session Session instance - * @deprecated Old code - */ - @Deprecated - public void unmarkProductAsOrdered(final Product product, final HttpSession session); - - /** - * Unmarks given product as choosen in session - * - * @param product Product to unmark as choosen - * @param session Session instance - * @deprecated Old code - */ - @Deprecated - public void unmarkProductAsChoosen(final Product product, final HttpSession session); - /** * Some getter for printable value from session or an empty string for null. * @@ -253,23 +191,12 @@ public interface PizzaBean extends FrameworkBean { */ public String getPrintableProduktCategory (final Product product) throws ServletException; - /** - * Marks all choosen products as ordered - * - * @param request Request instance - * @param session Session instance - * @throws javax.servlet.ServletException If something unexpected happened - * @deprecated Old code - */ - @Deprecated - public void markAllChoosenProductsAsOrdered (final HttpServletRequest request, final HttpSession session) throws ServletException; - /** * Adds given category data from request to database * * @param request Request instance * @throws javax.servlet.ServletException If something unexpected happened - * @throws org.mxchange.pizzaapplication.exceptions.CategoryTitleAlreadyUsedException If the given title is already used + * @throws org.mxchange.jshop.exceptions.CategoryTitleAlreadyUsedException If the given title is already used */ public void doAdminAddCategory (final HttpServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException; @@ -278,7 +205,7 @@ public interface PizzaBean extends FrameworkBean { * * @param request Request instance * @throws javax.servlet.ServletException If something unexpected happened - * @throws org.mxchange.pizzaapplication.exceptions.ProductTitleAlreadyUsedException If the given product title is already used + * @throws org.mxchange.jshop.exceptions.ProductTitleAlreadyUsedException If the given product title is already used */ public void doAdminAddProduct (final HttpServletRequest request) throws ServletException, ProductTitleAlreadyUsedException; diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java index 115632a1..c7b5fe9f 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java @@ -100,8 +100,10 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { * @param request Request instance * @param session Session instance * @return Total amount of all choosen products + * @deprecated Old lost code */ @Override + @Deprecated public int calculateTotalAmount (final HttpServletRequest request, final HttpSession session) throws ServletException { return this.app.calculateTotalAmount(request, session); } @@ -169,20 +171,6 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { return this.app.getDisabledHtmlFromSession(request, session); } - /** - * Some "getter" for choosen (checkbox) from session - * - * @param product Product instance - * @param request Request instance - * @param session Session instance - * @return Amount as string - */ - @Override - @Deprecated - public String getPrintableChoosenFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session) { - return this.app.getPrintableChoosenFromRequestSession(product, request, session); - } - /** * Checks if given Product instance is available and returns a printable * (human-readable) string. @@ -252,20 +240,6 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { return this.app.getTotalPositionPriceFromRequestSession(product, request, session); } - /** - * Handler for amount from request or session - * - * @param product Product instance - * @param request Request instance - * @param session Session instance - * @return Amount as string - */ - @Override - @Deprecated - public String handleAmountFromRequestSession (final Product product, final HttpServletRequest request, final HttpSession session) { - return this.app.handleAmountFromRequestSession(product, request, session); - } - /** * Checks whether the given product is choosen, request overules session. * @@ -280,42 +254,6 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { return this.app.isProductChoosen(product, request, session); } - /** - * Marks all choosen products as ordered - * - * @param request Request instance - * @param session Session instance - */ - @Override - @Deprecated - public void markAllChoosenProductsAsOrdered (final HttpServletRequest request, final HttpSession session) throws ServletException { - this.app.markAllChoosenProductsAsOrdered(request, session); - } - - /** - * Marks given product as choosen in session - * - * @param product Product to mark as ordered - * @param session Session instance - */ - @Override - @Deprecated - public void markProductAsChoosen (final Product product, final HttpSession session) { - this.app.markProductAsChoosen(product, session); - } - - /** - * Marks given product as ordered in session - * - * @param product Product to mark as ordered - * @param session Session instance - */ - @Override - @Deprecated - public void markProductAsOrdered (final Product product, final HttpSession session) { - this.app.markProductAsOrdered(product, session); - } - /** * Somewhat setter in session * @@ -328,30 +266,6 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { this.app.setValueInSession(session, key, value); } - /** - * Unmarks given product as choosen in session - * - * @param product Product to unmark as choosen - * @param session Session instance - */ - @Override - @Deprecated - public void unmarkProductAsChoosen (final Product product, final HttpSession session) { - this.app.unmarkProductAsChoosen(product, session); - } - - /** - * Unmarks given product as ordered in session - * - * @param product Product to unmark as ordered - * @param session Session instance - */ - @Override - @Deprecated - public void unmarkProductAsOrdered (final Product product, final HttpSession session) { - this.app.unmarkProductAsOrdered(product, session); - } - @Override public void doAdminAddCategory (final HttpServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException { this.app.doAdminAddCategory(request); diff --git a/web/errorHandler.jsp b/web/errorHandler.jsp index e6922773..9372959a 100644 --- a/web/errorHandler.jsp +++ b/web/errorHandler.jsp @@ -4,7 +4,7 @@ Author : Roland Haeder --%> -<%@page import="org.mxchange.pizzaapplication.beans.PizzaBean"%> +<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%> <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean"%> <%@page import="java.io.PrintWriter"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> diff --git a/web/form_handler/admin/do_category.jsp b/web/form_handler/admin/do_category.jsp index 656e336c..49dfc442 100644 --- a/web/form_handler/admin/do_category.jsp +++ b/web/form_handler/admin/do_category.jsp @@ -7,11 +7,11 @@ <%--<%@page errorPage="errorHandler.jsp" %>--%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean"%> -<%@page import="org.mxchange.pizzaapplication.beans.PizzaBean"%> +<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%> <%@page import="org.mxchange.pizzaapplication.beans.customer.CustomerBean" %> <%@page import="org.mxchange.pizzaapplication.product.Product"%> <%@page import="org.mxchange.pizzaapplication.exceptions.CategoryTitleAlreadyUsedException"%> - + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> diff --git a/web/form_handler/admin/do_product.jsp b/web/form_handler/admin/do_product.jsp index 441e01e0..16bfc1ca 100644 --- a/web/form_handler/admin/do_product.jsp +++ b/web/form_handler/admin/do_product.jsp @@ -7,10 +7,10 @@ <%--<%@page errorPage="errorHandler.jsp" %>--%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean"%> -<%@page import="org.mxchange.pizzaapplication.beans.PizzaBean"%> +<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%> <%@page import="org.mxchange.pizzaapplication.beans.customer.CustomerBean" %> <%@page import="org.mxchange.pizzaapplication.product.Product"%> - + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> diff --git a/web/static/gender_selection_box.jsp b/web/static/gender_selection_box.jsp index fb179f24..4829004b 100644 --- a/web/static/gender_selection_box.jsp +++ b/web/static/gender_selection_box.jsp @@ -5,11 +5,11 @@ --%> <%@page import="org.mxchange.jcore.contact.Gender"%> <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean"%> -<%@page import="org.mxchange.pizzaapplication.beans.PizzaBean"%> +<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%> <%@page import="org.mxchange.pizzaapplication.beans.customer.CustomerBean" %> - +