From e26f35169aed273a417003f65a56ef155be8a194 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 7 May 2016 16:33:58 +0200 Subject: [PATCH] these are noisy debug lines ... --- .../basket/PizzaBasketWebSessionBean.java | 42 +++++++++---------- .../checkout/PizzaCheckoutWebSessionBean.java | 10 +++-- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaBasketWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaBasketWebSessionBean.java index 08e2b7ad..f61972e2 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaBasketWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaBasketWebSessionBean.java @@ -90,7 +90,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle @Override public String addItem (final Product product) { // Trace message - //this.getLogger().logTrace(MessageFormat.format("addItem: product={0} - CALLED!", product)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("addItem: product={0} - CALLED!", product)); // product should not be null if (null == product) { @@ -104,7 +104,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle // Is orderedAmount set? if (this.getOrderedAmount() == null) { // Trace message - //this.getLogger().logTrace("addItem: orderedAmount not specified, returning null ... - EXIT!"); + //* NOISY-DEBUG: */ System.out.println("addItem: orderedAmount not specified, returning null ... - EXIT!"); // No orderedAmount specified?! return null; @@ -124,7 +124,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle this.setOrderedAmount(null); // Trace message - //this.getLogger().logTrace(MessageFormat.format("addItem: item {0} - has been added to basket. - EXIT!", item)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("addItem: item {0} - has been added to basket. - EXIT!", item)); // Added return "item_added"; //NOI18N @@ -137,13 +137,13 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle @Override public List allItems () { // Trace message - //this.getLogger().logTrace("allItems: CALLED!"); + //* NOISY-DEBUG: */ System.out.println("allItems: CALLED!"); // Deligate to basket instance List list = this.basket.getAll(); // Trace message - //this.getLogger().logTrace(MessageFormat.format("allItems: list={0} - EXIT!", list)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("allItems: list={0} - EXIT!", list)); // Return it return list; @@ -152,7 +152,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle @Override public Float calculateCurrentItemPrice () { // Trace message - //this.getLogger().logTrace("calculateCurrentItemPrice: CALLED!"); + //* NOISY-DEBUG: */ System.out.println("calculateCurrentItemPrice: CALLED!"); // Is the current item/amount set? if (this.getCurrentItem() == null) { @@ -170,7 +170,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle Float totalPrice = (this.getCurrentItem().getItemProduct().getProductPrice() * this.getCurrentItem().getOrderedAmount()); // Trace message - //this.getLogger().logTrace(MessageFormat.format("calculateCurrentItemPrice: totalPrice={0} - EXIT!", totalPrice)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("calculateCurrentItemPrice: totalPrice={0} - EXIT!", totalPrice)); // Return it return totalPrice; @@ -179,7 +179,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle @Override public Float calculateItemPrice (final AddableBasketItem item) { // Trace message - //this.getLogger().logTrace(MessageFormat.format("calculateItemPrice: item={0} - CALLED!", item)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("calculateItemPrice: item={0} - CALLED!", item)); // item must not be null if (null == item) { @@ -197,7 +197,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle } // Trace message - //this.getLogger().logTrace(MessageFormat.format("calculateItemPrice: totalPrice={0} - EXIT!", totalPrice)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("calculateItemPrice: totalPrice={0} - EXIT!", totalPrice)); // Return it return totalPrice; @@ -206,7 +206,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle @Override public Float calculateTotalPrice () { // Trace message - //this.getLogger().logTrace("calculateTotalPrice: CALLED!"); + //* NOISY-DEBUG: */ System.out.println("calculateTotalPrice: CALLED!"); // Init total price Float totalPrice = 0.0f; @@ -221,7 +221,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle } // Trace message - //this.getLogger().logTrace(MessageFormat.format("calculateTotalPrice: totalPrice={0} - EXIT!", totalPrice)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("calculateTotalPrice: totalPrice={0} - EXIT!", totalPrice)); // Return final sum return totalPrice; @@ -239,7 +239,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle @Override public String doChangeItem (final AddableBasketItem item) { // Trace message - //this.getLogger().logTrace(MessageFormat.format("doChangeItem: item={0} - CALLED!", item)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("doChangeItem: item={0} - CALLED!", item)); // item shall not be null if (null == item) { @@ -261,7 +261,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle } // Trace message - //this.getLogger().logTrace(MessageFormat.format("doChangeItem: targetPage={0} - EXIT!", targetPage)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("doChangeItem: targetPage={0} - EXIT!", targetPage)); // Return page return targetPage; @@ -280,7 +280,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle @Override public Long getItemAmount (final Product product) { // Trace message - //this.getLogger().logTrace(MessageFormat.format("getItemAmount: product={0} - CALLED!", product)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("getItemAmount: product={0} - CALLED!", product)); // product should not be null if (null == product) { @@ -308,7 +308,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle } // Trace message - //this.getLogger().logTrace(MessageFormat.format("getItemAmount: itemAmount={0} - EXIT!", itemAmount)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("getItemAmount: itemAmount={0} - EXIT!", itemAmount)); // Return it return itemAmount; @@ -351,7 +351,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle @Override public boolean isProductAdded (final Product product) { // Trace message - //this.getLogger().logTrace(MessageFormat.format("isProductAdded: product={0} - EXIT!", product)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("isProductAdded: product={0} - EXIT!", product)); // Must not be null if (null == product) { @@ -383,7 +383,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle } // Trace message - //this.getLogger().logTrace(MessageFormat.format("isProductAdded: isAdded={0} - EXIT!", isAdded)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("isProductAdded: isAdded={0} - EXIT!", isAdded)); // Return status return isAdded; @@ -392,7 +392,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle @Override public String outputLastAddedItem () { // Trace message - //this.getLogger().logTrace("outputLastAddedItem: CALLED!"); + //* NOISY-DEBUG: */ System.out.println("outputLastAddedItem: CALLED!"); // Default message String lastItem = ""; //NOI18N @@ -417,7 +417,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle } // Trace message - //this.getLogger().logTrace(MessageFormat.format("outputLastAddedItem: lastItem={0} - EXIT!", lastItem)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("outputLastAddedItem: lastItem={0} - EXIT!", lastItem)); // Return it return lastItem; @@ -443,7 +443,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle */ private AddableBasketItem getItemFromProduct (final Product product) { // Trace message - //this.getLogger().logTrace(MessageFormat.format("getItemFromProduct: product={0} - CALLED!", product)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("getItemFromProduct: product={0} - CALLED!", product)); // Product must not be null if (null == product) { @@ -486,7 +486,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle } // Trace message - //this.getLogger().logTrace(MessageFormat.format("getItemFromProduct: foundItem={0} - EXIT!", foundItem)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("getItemFromProduct: foundItem={0} - EXIT!", foundItem)); // Return it return foundItem; diff --git a/src/java/org/mxchange/pizzaapplication/beans/checkout/PizzaCheckoutWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/checkout/PizzaCheckoutWebSessionBean.java index f4df6087..4e832255 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/checkout/PizzaCheckoutWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/checkout/PizzaCheckoutWebSessionBean.java @@ -130,7 +130,7 @@ public class PizzaCheckoutWebSessionBean implements PizzaCheckoutWebSessionContr @Override public String doCheckout () { // Trace message - //this.getLogger().logTrace("doCheckout: CALLED!"); + //* NOISY-DEBUG: */ System.out.println("doCheckout: CALLED!"); // Are the beans set? if (null == this.basketController) { @@ -144,13 +144,13 @@ public class PizzaCheckoutWebSessionBean implements PizzaCheckoutWebSessionContr // Are at least the required fields set? if (!this.contactController.isRequiredPersonalDataSet()) { // Trace message - //this.getLogger().logTrace("doCheckout: Not all required fields are set, returning checkout2 ... - EXIT!"); + //* NOISY-DEBUG: */ System.out.println("doCheckout: Not all required fields are set, returning checkout2 ... - EXIT!"); // Not set, should not happen return "checkout2"; //NOI18N } else if (this.basketController.isEmpty()) { // Trace message - //this.getLogger().logTrace("doCheckout: basket is empty, returning empty_basket ... - EXIT!"); + //* NOISY-DEBUG: */ System.out.println("doCheckout: basket is empty, returning empty_basket ... - EXIT!"); // Nothing to order return "empty_basket"; //NOI18N @@ -161,11 +161,13 @@ public class PizzaCheckoutWebSessionBean implements PizzaCheckoutWebSessionContr // Debug message //this.getLogger().logDebug(MessageFormat.format("doCheckout: customer={0}", this.getCustomer())); + // Get ordered list List list = this.basketController.allItems(); // Debug message - //this.getLogger().logTrace(MessageFormat.format("doCheckout: list={0}", list)); + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("doCheckout: list={0}", list)); + // Construct container WrapableCheckout wrapper = new CheckoutWrapper(); wrapper.setCustomer(this.getCustomer()); -- 2.39.5