From: Roland Haeder Date: Thu, 15 Oct 2015 07:52:08 +0000 (+0200) Subject: Cleanup through inspection + updated jar(s) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1655b1f85ba94b7391584797358b690384e133bd;p=pizzaservice-war.git Cleanup through inspection + updated jar(s) Signed-off-by:Roland Häder --- diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar index 4bf2b793..588f0e34 100644 Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ diff --git a/lib/jcore-logger-lib.jar b/lib/jcore-logger-lib.jar index 50499372..ce30ba8a 100644 Binary files a/lib/jcore-logger-lib.jar and b/lib/jcore-logger-lib.jar differ diff --git a/lib/jcore.jar b/lib/jcore.jar index a6eb6775..1c2e5700 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar index db108dde..6ea5dee8 100644 Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ diff --git a/lib/jcountry-core.jar b/lib/jcountry-core.jar index 9daf4363..eaf6110d 100644 Binary files a/lib/jcountry-core.jar and b/lib/jcountry-core.jar differ diff --git a/lib/jcountry-lib.jar b/lib/jcountry-lib.jar index 22aa4b66..776d42a1 100644 Binary files a/lib/jcountry-lib.jar and b/lib/jcountry-lib.jar differ diff --git a/lib/jphone-core.jar b/lib/jphone-core.jar index 97bdd394..9637788d 100644 Binary files a/lib/jphone-core.jar and b/lib/jphone-core.jar differ diff --git a/lib/jshop-core.jar b/lib/jshop-core.jar index a0a80309..9ae15ea5 100644 Binary files a/lib/jshop-core.jar and b/lib/jshop-core.jar differ diff --git a/lib/jshop-ee-lib.jar b/lib/jshop-ee-lib.jar index dccf16a3..b7cc11d2 100644 Binary files a/lib/jshop-ee-lib.jar and b/lib/jshop-ee-lib.jar differ diff --git a/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java index 467033c4..edf197f1 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java @@ -57,17 +57,18 @@ public class BasketWebBean implements BasketWebController { */ private final BasketSessionBeanRemote basketBean; - /////////////////////// Properties ///////////////////// - /** - * Ordered orderedAmount - */ - private Long orderedAmount; /** * Current item */ private AddableBasketItem currentItem; + /////////////////////// Properties ///////////////////// + /** + * Ordered orderedAmount + */ + private Long orderedAmount; + /** * Default constructor */ @@ -259,16 +260,6 @@ public class BasketWebBean implements BasketWebController { this.basket.clear(); } - @Override - public Long getOrderedAmount () { - return this.orderedAmount; - } - - @Override - public void setOrderedAmount (final Long orderedAmount) { - this.orderedAmount = orderedAmount; - } - @Override public AddableBasketItem getCurrentItem () { return this.currentItem; @@ -327,6 +318,16 @@ public class BasketWebBean implements BasketWebController { return this.basket.getLastNumRows(); } + @Override + public Long getOrderedAmount () { + return this.orderedAmount; + } + + @Override + public void setOrderedAmount (final Long orderedAmount) { + this.orderedAmount = orderedAmount; + } + @Override public boolean hasItems () { // Call above and invert it diff --git a/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebController.java b/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebController.java index f976aba2..04b3cd6b 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebController.java @@ -36,14 +36,14 @@ public interface BasketWebController extends Serializable { *

* @return Redirect target or null */ - public String addItem (final Product product); + String addItem (final Product product); /** * Gets for all added items *

* @return A list of all added items */ - public List allItems (); + List allItems (); /** * Calculates total price (no tax added) of current item. If no current item @@ -51,7 +51,7 @@ public interface BasketWebController extends Serializable { *

* @return Current item's total price */ - public Float calculateCurrentItemPrice (); + Float calculateCurrentItemPrice (); /** * Calculates total price (no tax added) for given item. @@ -60,14 +60,14 @@ public interface BasketWebController extends Serializable { *

* @return Total price */ - public Float calculateItemPrice (final AddableBasketItem item); + Float calculateItemPrice (final AddableBasketItem item); /** * Calculates total sum (no tax added) for all items *

* @return Total price of all items */ - public Float calculateTotalPrice (); + Float calculateTotalPrice (); /** * Changes given item instance's amount in basket and redirects to proper @@ -77,40 +77,40 @@ public interface BasketWebController extends Serializable { *

* @return Page redirection */ - public String changeItem (final AddableBasketItem item); + String changeItem (final AddableBasketItem item); /** * Clears this basket instance */ - public void clear (); + void clear (); /** * Getter for item amount property *

* @return Item amount property */ - public Long getOrderedAmount (); + Long getOrderedAmount (); /** * Setter for item amount property *

* @param amount Item amount property */ - public void setOrderedAmount (final Long amount); + void setOrderedAmount (final Long amount); /** * Getter for current item *

* @return Current item */ - public AddableBasketItem getCurrentItem (); + AddableBasketItem getCurrentItem (); /** * Setter for current item *

* @param currentItem Current item */ - public void setCurrentItem (final AddableBasketItem currentItem); + void setCurrentItem (final AddableBasketItem currentItem); /** * Some getter for item amount of given product. This method requires a full @@ -121,21 +121,21 @@ public interface BasketWebController extends Serializable { *

* @return Item amount of given product */ - public Long getItemAmount (final Product product); + Long getItemAmount (final Product product); /** * Getter for last entry *

* @return Last added item in basket */ - public AddableBasketItem getLast (); + AddableBasketItem getLast (); /** * Getter for last num rows *

* @return Last num rows */ - public int getLastNumRows (); + int getLastNumRows (); /** * Checks whether the basket has items in it. This method is wrapper to @@ -143,14 +143,14 @@ public interface BasketWebController extends Serializable { *

* @return Whether the basket is empty */ - public boolean hasItems (); + boolean hasItems (); /** * Checks whether the basket is empty *

* @return Whether the basket is empty */ - public boolean isEmpty (); + boolean isEmpty (); /** * Checks whether the currently set product is added in basked @@ -159,12 +159,12 @@ public interface BasketWebController extends Serializable { *

* @return Whether the product is added */ - public boolean isProductAdded (final Product product); + boolean isProductAdded (final Product product); /** * Outputs last added item in the basket. *

* @return Last added item */ - public String outputLastAddedItem (); + String outputLastAddedItem (); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebController.java b/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebController.java index c8f5358a..4cef66d8 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebController.java @@ -32,33 +32,33 @@ public interface AdminCategoryWebController { * @throws javax.faces.view.facelets.FaceletException If something * unexpected happened */ - public void addCategory () throws FaceletException; + void addCategory () throws FaceletException; /** * Getter for parent id *

* @return Parent id */ - public Category getParentCategory (); + Category getParentCategory (); /** * Setter for parent category *

* @param parentCategory Parent category to set */ - public void setParentCategory (final Category parentCategory); + void setParentCategory (final Category parentCategory); /** * Getter for category title *

* @return the title */ - public String getCategoryTitle (); + String getCategoryTitle (); /** * Setter for category title *

* @param categoryTitle the title to set */ - public void setCategoryTitle (final String categoryTitle); + void setCategoryTitle (final String categoryTitle); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebBean.java index 465ea404..dcfafb9c 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebBean.java @@ -55,25 +55,29 @@ public class CheckoutWebBean implements CheckoutWebController { */ private static final long serialVersionUID = 51_987_348_347_183L; + ////////////////////// Bean injections /////////////////////// /** - * Connection + * Basket bean */ - private Connection connection; + @Inject + private BasketWebController basketController; /** - * Message producer + * Connection */ - private MessageProducer messageProducer; + private Connection connection; /** - * Queue instance + * Customer instance */ - private Queue queue; + private Customer customer; /** - * Session instance + * Customer bean */ - private Session session; + @Inject + private CustomerWebController customerController; + /** * Object message @@ -81,22 +85,15 @@ public class CheckoutWebBean implements CheckoutWebController { private ObjectMessage message; /** - * Customer instance + * Message producer */ - private Customer customer; + private MessageProducer messageProducer; - ////////////////////// Bean injections /////////////////////// /** - * Basket bean + * Queue instance */ - @Inject - private BasketWebController basketController; + private Queue queue; - /** - * Customer bean - */ - @Inject - private CustomerWebController customerController; /** * Receipt bean @@ -104,6 +101,27 @@ public class CheckoutWebBean implements CheckoutWebController { @Inject private ReceiptWebController receiptController; + /** + * Session instance + */ + private Session session; + + /** + * Destructor + */ + @PreDestroy + public void destroy () { + try { + // Try to close all + this.messageProducer.close(); + this.session.close(); + this.connection.close(); + } catch (final JMSException ex) { + // TODO: Continue to throw is fine? + throw new FacesException(ex); + } + } + @Override public String doCheckout () { // Trace message @@ -188,43 +206,22 @@ public class CheckoutWebBean implements CheckoutWebController { try { // Get initial context Context context = new InitialContext(); - // Get factory from JMS resource QueueConnectionFactory connectionFactory = (QueueConnectionFactory) context.lookup("jms/shopConnectionFactory"); //NOI18N - // Lookup queue this.queue = (Queue) context.lookup("jms/shopCheckoutQueue"); //NOI18N // Create connection this.connection = connectionFactory.createConnection(); - // Init session instance this.session = this.connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - // And message producer - this.messageProducer = session.createProducer(queue); - + this.messageProducer = this.session.createProducer(this.queue); // Finally the message instance itself this.message = this.session.createObjectMessage(); - } catch (final NamingException | JMSException e) { + }catch (final NamingException | JMSException e) { // Continued to throw throw new FacesException(e); } } - - /** - * Destructor - */ - @PreDestroy - public void destroy () { - try { - // Try to close all - this.messageProducer.close(); - this.session.close(); - this.connection.close(); - } catch (final JMSException ex) { - // TODO: Continue to throw is fine? - throw new FacesException(ex); - } - } } diff --git a/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebController.java b/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebController.java index 395e5439..513ed541 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebController.java @@ -31,19 +31,19 @@ public interface CheckoutWebController extends Serializable { *

* @return Page redirection target */ - public String doCheckout (); + String doCheckout (); /** * Getter for customer instance *

* @return Customer instance */ - public Customer getCustomer (); + Customer getCustomer (); /** * Setter for customer instance *

* @param customer Customer instance */ - public void setCustomer (final Customer customer); + void setCustomer (final Customer customer); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/country/CountryWebController.java b/src/java/org/mxchange/pizzaapplication/beans/country/CountryWebController.java index 666fab67..b9fac8c8 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/country/CountryWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/country/CountryWebController.java @@ -32,5 +32,5 @@ public interface CountryWebController extends Serializable { *

* @return All countries */ - public List allCountries (); + List allCountries (); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java index bb57d7f1..13d3fa72 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java @@ -36,180 +36,180 @@ public interface CustomerWebController extends Serializable { *

* @return A Customer instance */ - public Customer createCustomerInstance (); + Customer createCustomerInstance (); /** * Cellphone number *

* @return the cellphoneNumber */ - public DialableCellphoneNumber getCellphoneNumber (); + DialableCellphoneNumber getCellphoneNumber (); /** * Cellphone number *

* @param cellphoneNumber the cellphoneNumber to set */ - public void setCellphoneNumber (final DialableCellphoneNumber cellphoneNumber); + void setCellphoneNumber (final DialableCellphoneNumber cellphoneNumber); /** * City *

* @return the city */ - public String getCity (); + String getCity (); /** * City *

* @param city the city to set */ - public void setCity (final String city); + void setCity (final String city); /** * Getter for country instance *

* @return Country instance */ - public Country getCountry (); + Country getCountry (); /** * Setter for country instance *

* @param country Country instance */ - public void setCountry (final Country country); + void setCountry (final Country country); /** * Email address *

* @return the emailAddress */ - public String getEmailAddress (); + String getEmailAddress (); /** * Email address *

* @param emailAddress the emailAddress to set */ - public void setEmailAddress (final String emailAddress); + void setEmailAddress (final String emailAddress); /** * Family name *

* @return the familyName */ - public String getFamilyName (); + String getFamilyName (); /** * Family name *

* @param familyName the familyName to set */ - public void setFamilyName (final String familyName); + void setFamilyName (final String familyName); /** * Fax number *

* @return the faxNumber */ - public DialableFaxNumber getFaxNumber (); + DialableFaxNumber getFaxNumber (); /** * Fax number *

* @param faxNumber the faxNumber to set */ - public void setFaxNumber (final DialableFaxNumber faxNumber); + void setFaxNumber (final DialableFaxNumber faxNumber); /** * First name *

* @return the first name */ - public String getFirstName (); + String getFirstName (); /** * First name *

* @param firstName the first name to set */ - public void setFirstName (final String firstName); + void setFirstName (final String firstName); /** * Gender of the contact *

* @return the gender */ - public Gender getGender (); + Gender getGender (); /** * Gender of the contact *

* @param gender the gender to set */ - public void setGender (final Gender gender); + void setGender (final Gender gender); /** * House number *

* @return the houseNumber */ - public Short getHouseNumber (); + Short getHouseNumber (); /** * House number *

* @param houseNumber the houseNumber to set */ - public void setHouseNumber (final Short houseNumber); + void setHouseNumber (final Short houseNumber); /** * Phone number *

* @return the phoneNumber */ - public DialableLandLineNumber getPhoneNumber (); + DialableLandLineNumber getPhoneNumber (); /** * Phone number *

* @param phoneNumber the phoneNumber to set */ - public void setPhoneNumber (final DialableLandLineNumber phoneNumber); + void setPhoneNumber (final DialableLandLineNumber phoneNumber); /** * Street *

* @return the street */ - public String getStreet (); + String getStreet (); /** * Street *

* @param street the street to set */ - public void setStreet (final String street); + void setStreet (final String street); /** * ZIP code *

* @return the zipCode */ - public Integer getZipCode (); + Integer getZipCode (); /** * ZIP code *

* @param zipCode the zipCode to set */ - public void setZipCode (final Integer zipCode); + void setZipCode (final Integer zipCode); /** * Checks whether all required personal data is set *

* @return Whether the required personal data is set */ - public boolean isRequiredPersonalDataSet (); + boolean isRequiredPersonalDataSet (); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/gender/GenderWebController.java b/src/java/org/mxchange/pizzaapplication/beans/gender/GenderWebController.java index 722033d1..5618aa6b 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/gender/GenderWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/gender/GenderWebController.java @@ -32,12 +32,12 @@ public interface GenderWebController extends Serializable { *

* @return All genders as array */ - public Gender[] getAllGenders (); + Gender[] getAllGenders (); /** * Getter for only selectable genders as array, UNKNOWN is not selectable *

* @return All genders as array */ - public List getSelectableGenders (); + List getSelectableGenders (); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java index 3d2b74c5..8c7c9b02 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java @@ -144,7 +144,7 @@ public class AdminProductWebBean implements AdminProductWebController { @Override public Category getProductCategory () { - return productCategory; + return this.productCategory; } @Override diff --git a/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebController.java b/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebController.java index 2da2b11a..ac384d77 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebController.java @@ -34,7 +34,7 @@ public interface AdminProductWebController { * @throws javax.faces.view.facelets.FaceletException If something * unexpected happened */ - public void addProduct () throws FaceletException; + void addProduct () throws FaceletException; /** * Some "getter" for a linked list of all products @@ -43,61 +43,61 @@ public interface AdminProductWebController { *

* @throws javax.faces.view.facelets.FaceletException If anything went wrong */ - public List getAllProducts () throws FaceletException; + List getAllProducts () throws FaceletException; /** * Getter for product's available property *

* @return Product's available property */ - public Boolean getProductAvailability (); + Boolean getProductAvailability (); /** * Setter for product's available property *

* @param available Product's available property */ - public void setProductAvailability (final Boolean available); + void setProductAvailability (final Boolean available); /** * Getter for product's category *

* @return Product's category */ - public Category getProductCategory (); + Category getProductCategory (); /** * Setter for product's category instance *

* @param productCategory Product's category instance */ - public void setProductCategory (final Category productCategory); + void setProductCategory (final Category productCategory); /** * Getter for product's price property *

* @return Product's price property */ - public Float getProductPrice (); + Float getProductPrice (); /** * Setter for product's price property *

* @param price Product's price property */ - public void setProductPrice (final Float price); + void setProductPrice (final Float price); /** * Getter for product's title property *

* @return Product's title */ - public String getProductTitle (); + String getProductTitle (); /** * Setter for product's title property *

* @param title Product's title */ - public void setProductTitle (final String title); + void setProductTitle (final String title); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/receipt/ReceiptWebController.java b/src/java/org/mxchange/pizzaapplication/beans/receipt/ReceiptWebController.java index ff5998b6..85e85e98 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/receipt/ReceiptWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/receipt/ReceiptWebController.java @@ -31,19 +31,19 @@ public interface ReceiptWebController extends Serializable { *

* @return Access key to receipt */ - public String fetchAccessKey (); + String fetchAccessKey (); /** * Getter for customer instamce *

* @return Customer instance */ - public Customer getCustomer (); + Customer getCustomer (); /** * Setter for customer instamce *

* @param customer Customer instance */ - public void setCustomer (final Customer customer); + void setCustomer (final Customer customer); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/shop/ShopWebController.java b/src/java/org/mxchange/pizzaapplication/beans/shop/ShopWebController.java index cfc888dd..24a51d58 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/shop/ShopWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/shop/ShopWebController.java @@ -34,14 +34,14 @@ public interface ShopWebController extends Serializable { *

* @param category Category instance */ - public void addCategory (final Category category); + void addCategory (final Category category); /** * Adds given product to the "cached" instance *

* @param product Product instance */ - public void addProduct (final Product product); + void addProduct (final Product product); /** * Some "getter" for a linked list of all categories @@ -50,7 +50,7 @@ public interface ShopWebController extends Serializable { *

* @throws javax.faces.view.facelets.FaceletException If anything went wrong */ - public List getAllCategories () throws FaceletException; + List getAllCategories () throws FaceletException; /** * Some "getter" for a linked list of all categories including "Has no @@ -60,7 +60,7 @@ public interface ShopWebController extends Serializable { *

* @throws javax.faces.view.facelets.FaceletException If anything went wrong */ - public List getAllCategoriesParent () throws FaceletException; + List getAllCategoriesParent () throws FaceletException; /** * Some "getter" for a linked list of only available products @@ -69,5 +69,5 @@ public interface ShopWebController extends Serializable { *

* @throws javax.faces.view.facelets.FaceletException If anything went wrong */ - public List getAvailableProducts () throws FaceletException; + List getAvailableProducts () throws FaceletException; }