From 0d0ea908adc6bf06fb5d31da958594050d107c25 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 15 Oct 2015 09:45:21 +0200 Subject: [PATCH] =?utf8?q?Cleanup=20through=20inspection=20+=20updated=20j?= =?utf8?q?ar(s)=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/jcontacts-core.jar | Bin 20748 -> 20850 bytes lib/jcore.jar | Bin 13656 -> 13647 bytes lib/jcoreee.jar | Bin 18511 -> 18794 bytes .../model/basket/AddableBasketItem.java | 22 ++-- .../jshopcore/model/basket/Basket.java | 14 +-- .../jshopcore/model/category/Category.java | 14 +-- .../jshopcore/model/customer/Customer.java | 34 +++---- .../model/customer/CustomerUtils.java | 94 +++++++++--------- .../jshopcore/model/order/Orderable.java | 20 ++-- .../jshopcore/model/product/Product.java | 22 ++-- .../jshopcore/wrapper/WrapableCheckout.java | 8 +- 11 files changed, 114 insertions(+), 114 deletions(-) diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar index 4bf2b793f990ceb4be6bc46a3fcbabd1234b7a7a..588f0e34e77622c6568476b940a2c8377d868844 100644 GIT binary patch delta 2530 zcmaJ@Yiv}<75>idwdd~LyT)&`#*1w*UgP(3ZEP0r+QyHp*AE;5#(-JCF$QA?+fZns ziyLU8C{jb_M--&01yMy+TL;)YXemjfR;tui?ax-ND&l z0S7&nw!kSNbbcX})(n)RKBH|Fd+r>ui1MyMfmz;{_XcXpf@3HjUFh z-C6u+W5TBWI#}{v;DC*P;-OUcZ90f=+PH<=iY9G3L*!ultT<#qXRvHv|-!8T6tG_vXWh3UGJXOA39%;_ICH6&m0z`!mGV|ZSnT4A?^V!U8s5B7R7j(uKCV82uc zEG8aQm^5)nAz|S#j#xN~DGOe_C|0IL^_ZX;sg9c{HE}}JW~F`7#AXw70_RPXnRtnz ziBk#-3X7?!=HF4FYo?5lJ9s>CCQ)~KX=b)=U}y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?gnh_7E0OBPU6{U<#8OJMB2|?oq%IB+yW|k4vj9`tfBC2Nt$b+i+8o8__ zyu5#ABjaWy{$C+6ofMjh(*<2hI2c=T%HD8|9yuTOSN(=|M#l%sy4DL@ik)}CY?&Hi z_rl{|kP`4^%RlAaaHgLBUD$71D&+D|y7!^!vZd8;+n|T!U585^Yqj)@GwgmvbuX8< z=DPmCu8(KCuID&pR@?zi>KcC(ayWLY)qt@+_pcg&Wg zn)`(sEG&M=-I(33irHMln4RFYO!#hyDdYq>Q0my_=iKkD5Yqx_#`TDdP0&W^pt!HQ$?xiXn2Z$_fp z`-Be0s!UJ2V@sA@<%>=&rYcAmi_euwvzikMnY?-0`_w7>kAFgE)EldKuaSx^a!Y5z Kl6%d{!hZqef@}}~ diff --git a/src/org/mxchange/jshopcore/model/basket/AddableBasketItem.java b/src/org/mxchange/jshopcore/model/basket/AddableBasketItem.java index a732413..c85178a 100644 --- a/src/org/mxchange/jshopcore/model/basket/AddableBasketItem.java +++ b/src/org/mxchange/jshopcore/model/basket/AddableBasketItem.java @@ -32,74 +32,74 @@ public interface AddableBasketItem extends Serializable { * @param object Other object to check */ @Override - public boolean equals (final Object object); + boolean equals (final Object object); /** * Getter for item amount *

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

* @param amount the amount to set */ - public void setOrderedAmount (final Long amount); + void setOrderedAmount (final Long amount); /** * Getter for entry id (from database backend) *

* @return the id */ - public Long getItemId (); + Long getItemId (); /** * Setter for entry id (from database backend) *

* @param id the id to set */ - public void setItemId (final Long id); + void setItemId (final Long id); /** * Getter for item type *

* @return the type */ - public String getItemType (); + String getItemType (); /** * Setter for item type *

* @param type the type to set */ - public void setItemType (final String type); + void setItemType (final String type); /** * Getter for product instance *

* @return the product */ - public Product getItemProduct (); + Product getItemProduct (); /** * Setter fo product instance *

* @param product the product to set */ - public void setItemProduct (final Product product); + void setItemProduct (final Product product); /** * Hash-code calculattion */ @Override - public int hashCode (); + int hashCode (); /** * Determines whether the item has a Product instance set *

* @return Whether a Product instance is set */ - public boolean isProductType (); + boolean isProductType (); } diff --git a/src/org/mxchange/jshopcore/model/basket/Basket.java b/src/org/mxchange/jshopcore/model/basket/Basket.java index d2e9883..d2e9c08 100644 --- a/src/org/mxchange/jshopcore/model/basket/Basket.java +++ b/src/org/mxchange/jshopcore/model/basket/Basket.java @@ -36,33 +36,33 @@ public interface Basket extends Serializable { * @throws org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException * If the item instance has already been added */ - public void addItem (final T item) throws BasketItemAlreadyAddedException; + void addItem (final T item) throws BasketItemAlreadyAddedException; /** * Clears the basket instance */ - public void clear (); + void clear (); /** * Some "getter" for all entries in this basket *

* @return Map on all basket items */ - public List getAll (); + List getAll (); /** * Getter for last entry *

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

* @return Last num rows */ - public int getLastNumRows (); + int getLastNumRows (); /** * Checks whether the given item has already been added by checking the @@ -72,12 +72,12 @@ public interface Basket extends Serializable { *

* @return Whether the given item has been found */ - public boolean isAdded (final T item); + boolean isAdded (final T item); /** * Checks if the basket is empty *

* @return Whether the basket is empty */ - public boolean isEmpty (); + boolean isEmpty (); } diff --git a/src/org/mxchange/jshopcore/model/category/Category.java b/src/org/mxchange/jshopcore/model/category/Category.java index 43b2d26..d5b56be 100644 --- a/src/org/mxchange/jshopcore/model/category/Category.java +++ b/src/org/mxchange/jshopcore/model/category/Category.java @@ -30,47 +30,47 @@ public interface Category extends Serializable { *

* @param category Source category instance */ - public void copyAll (final Category category); + void copyAll (final Category category); /** * Id number of category *

* @return the id */ - public Long getCategoryId (); + Long getCategoryId (); /** * Id number of category *

* @param id the id to set */ - public void setCategoryId (final Long id); + void setCategoryId (final Long id); /** * Parent category *

* @return the parent category */ - public Category getParentCategory (); + Category getParentCategory (); /** * Parent category *

* @param parentCategory the parent category to set */ - public void setParentCategory (final Category parentCategory); + void setParentCategory (final Category parentCategory); /** * Title of category *

* @return the title */ - public String getCategoryTitle (); + String getCategoryTitle (); /** * Title of category *

* @param title the title to set */ - public void setCategoryTitle (final String title); + void setCategoryTitle (final String title); } diff --git a/src/org/mxchange/jshopcore/model/customer/Customer.java b/src/org/mxchange/jshopcore/model/customer/Customer.java index a86b71b..a44a196 100644 --- a/src/org/mxchange/jshopcore/model/customer/Customer.java +++ b/src/org/mxchange/jshopcore/model/customer/Customer.java @@ -33,117 +33,117 @@ public interface Customer extends Serializable { *

* @param customer Source instance */ - public void copyAll (final Customer customer); + void copyAll (final Customer customer); /** * Getter for contact instance *

* @return Contact id number */ - public Contact getContact (); + Contact getContact (); /** * Setter for contact instance *

* @param contact Contact instance */ - public void setContact (final Contact contact); + void setContact (final Contact contact); /** * Getter for confirmation key *

* @return Confirmation key */ - public String getCustomerConfirmKey (); + String getCustomerConfirmKey (); /** * Setter for confirmation key *

* @param customerConfirmKey Confirmation key */ - public void setCustomerConfirmKey (final String customerConfirmKey); + void setCustomerConfirmKey (final String customerConfirmKey); /** * Getter for "created" timestamp *

* @return "created" timestamp */ - public Calendar getCustomerCreated (); + Calendar getCustomerCreated (); /** * Setter for "created" timestamp *

* @param customerCreated "created" timestamp */ - public void setCustomerCreated (final Calendar customerCreated); + void setCustomerCreated (final Calendar customerCreated); /** * Getter for customer id number *

* @return Customer id number */ - public Long getCustomerId (); + Long getCustomerId (); /** * Settte for customer id number *

* @param customerId Customer id number */ - public void setCustomerId (final Long customerId); + void setCustomerId (final Long customerId); /** * Getter for "locked" timestamp *

* @return "locked" timestamp */ - public Calendar getCustomerLocked (); + Calendar getCustomerLocked (); /** * Getter for "locked" timestamp *

* @param customerLocked "locked" timestamp */ - public void setCustomerLocked (final Calendar customerLocked); + void setCustomerLocked (final Calendar customerLocked); /** * Getter for customer number *

* @return Customer number */ - public String getCustomerNumber (); + String getCustomerNumber (); /** * Setter for customer number *

* @param customerNumber Customer number */ - public void setCustomerNumber (final String customerNumber); + void setCustomerNumber (final String customerNumber); /** * Getter for password hash *

* @return Password hash */ - public String getCustomerPasswordHash (); + String getCustomerPasswordHash (); /** * Setter for password hash *

* @param customerPasswordHash Password hash */ - public void setCustomerPasswordHash (final String customerPasswordHash); + void setCustomerPasswordHash (final String customerPasswordHash); /** * Getter for account status *

* @return Account status */ - public CustomerAccountStatus getCustomerAccountStatus (); + CustomerAccountStatus getCustomerAccountStatus (); /** * Setter for account status *

* @param customerStatus Account status */ - public void setCustomerAccountStatus (final CustomerAccountStatus customerStatus); + void setCustomerAccountStatus (final CustomerAccountStatus customerStatus); } diff --git a/src/org/mxchange/jshopcore/model/customer/CustomerUtils.java b/src/org/mxchange/jshopcore/model/customer/CustomerUtils.java index 1ef7cfb..3b06d44 100644 --- a/src/org/mxchange/jshopcore/model/customer/CustomerUtils.java +++ b/src/org/mxchange/jshopcore/model/customer/CustomerUtils.java @@ -33,23 +33,16 @@ import org.mxchange.jshopcore.model.order.ShopOrder; public class CustomerUtils extends BaseFrameworkSystem { /** - * No instance from this class - */ - private CustomerUtils () { - } - - /** - * Generates an unique customer number by checking is existence + * Generates an unique access key. *

* @param em Entity manager instance + * @param customer Customer instance *

- * @return Generated customer number (not used before) - *

- * @throws java.sql.SQLException If any SQL error occured + * @return An unique access key */ - public static String generateCustomerNumber (final EntityManager em) throws SQLException { + public static String generateAccessKey (final EntityManager em, final Customer customer) { // Trace message - // TODO: utils.getLogger().logTrace(MessageFormat.format("generateCustomerNumber: connection={0} - CALLED!", connection)); + // TODO: utils.getLogger().logTrace(MessageFormat.format("generateAccessKey: connection={0} - CALLED!", connection)); // em cannot be null if (null == em) { @@ -59,49 +52,52 @@ public class CustomerUtils extends BaseFrameworkSystem { // Not open throw new IllegalStateException("Entity manager is closed."); } - - // Generate number - String customerNumber = null; - + + // Generate fake order instance + Orderable orderable = null; + + // Generate access keyy + String accessKey = null; + // Default is found boolean isFound = true; // Is the number used? while (isFound) { // Both number parts - long part1 = Math.round(Math.random() * 100_000); - long part2 = Math.round(Math.random() * 1_000); - - // Generate new number - customerNumber = String.format("%s-%s", part1, part2); //NOI18N - - // Try it + String randString = String.format("%s:%s:%s", Long.toHexString(Math.round(Math.random() * 1_000_000)), em, customer.getCustomerNumber()); + + // Generate access key, use SHA512 hashing and BASE64-encoding for strong key generation + accessKey = Base64.encodeBase64String(Sha2Crypt.sha512Crypt(randString.getBytes()).getBytes()).substring(0, 100); + + // Try this try { - // Get instance - Customer customer = em.getReference(ShopCustomer.class, customerNumber); + // Get reference + orderable = em.getReference(ShopOrder.class, accessKey); } catch (final EntityNotFoundException ex) { - // Not found + // Not found, so abort loop here isFound = false; } } // Trace message - // TODO: utils.getLogger().logTrace(MessageFormat.format("generateCustomerNumber: customerNumber={0} - EXIT!", customerNumber)); + // TODO: utils.getLogger().logTrace(MessageFormat.format("generateAccessKey: accessKey={0} - EXIT!", accessKey)); // Found one - return customerNumber; + return accessKey; } /** - * Generates an unique access key. + * Generates an unique customer number by checking is existence *

* @param em Entity manager instance - * @param customer Customer instance *

- * @return An unique access key + * @return Generated customer number (not used before) + *

+ * @throws java.sql.SQLException If any SQL error occured */ - public static String generateAccessKey (final EntityManager em, final Customer customer) { + public static String generateCustomerNumber (final EntityManager em) throws SQLException { // Trace message - // TODO: utils.getLogger().logTrace(MessageFormat.format("generateAccessKey: connection={0} - CALLED!", connection)); + // TODO: utils.getLogger().logTrace(MessageFormat.format("generateCustomerNumber: connection={0} - CALLED!", connection)); // em cannot be null if (null == em) { @@ -112,11 +108,8 @@ public class CustomerUtils extends BaseFrameworkSystem { throw new IllegalStateException("Entity manager is closed."); } - // Generate fake order instance - Orderable orderable = null; - - // Generate access keyy - String accessKey = null; + // Generate number + String customerNumber = null; // Default is found boolean isFound = true; @@ -124,24 +117,31 @@ public class CustomerUtils extends BaseFrameworkSystem { // Is the number used? while (isFound) { // Both number parts - String randString = String.format("%s:%s:%s", Long.toHexString(Math.round(Math.random() * 1_000_000)), em, customer.getCustomerNumber()); + long part1 = Math.round(Math.random() * 100_000); + long part2 = Math.round(Math.random() * 1_000); - // Generate access key, use SHA512 hashing and BASE64-encoding for strong key generation - accessKey = Base64.encodeBase64String(Sha2Crypt.sha512Crypt(randString.getBytes()).getBytes()).substring(0, 100); + // Generate new number + customerNumber = String.format("%s-%s", part1, part2); //NOI18N - // Try this + // Try it try { - // Get reference - orderable = em.getReference(ShopOrder.class, accessKey); + // Get instance + Customer customer = em.getReference(ShopCustomer.class, customerNumber); } catch (final EntityNotFoundException ex) { - // Not found, so abort loop here + // Not found isFound = false; } } // Trace message - // TODO: utils.getLogger().logTrace(MessageFormat.format("generateAccessKey: accessKey={0} - EXIT!", accessKey)); + // TODO: utils.getLogger().logTrace(MessageFormat.format("generateCustomerNumber: customerNumber={0} - EXIT!", customerNumber)); // Found one - return accessKey; + return customerNumber; + } + + /** + * No instance from this class + */ + private CustomerUtils () { } } diff --git a/src/org/mxchange/jshopcore/model/order/Orderable.java b/src/org/mxchange/jshopcore/model/order/Orderable.java index 4517cda..66cf7aa 100644 --- a/src/org/mxchange/jshopcore/model/order/Orderable.java +++ b/src/org/mxchange/jshopcore/model/order/Orderable.java @@ -34,68 +34,68 @@ public interface Orderable extends Serializable { *

* @return Access key */ - public String getAccessKey (); + String getAccessKey (); /** * Setter for access key *

* @param accessKey Access key */ - public void setAccessKey (final String accessKey); + void setAccessKey (final String accessKey); /** * Getter for created timestamp *

* @return Created timestamp */ - public Calendar getOrderCreated (); + Calendar getOrderCreated (); /** * Setter for created timestamp *

* @param created Created timestamp */ - public void setOrderCreated (final Calendar created); + void setOrderCreated (final Calendar created); /** * 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); /** * Getter for order id *

* @return Order id */ - public Long getOrderId (); + Long getOrderId (); /** * Setter for order id *

* @param id Order id */ - public void setOrderId (final Long id); + void setOrderId (final Long id); /** * Getter for list of ordered basket items *

* @return List of items */ - public List getOrderedItems (); + List getOrderedItems (); /** * Setter for list of ordered basket items *

* @param orderedItems List of ordered items */ - public void setOrderedItems (final List orderedItems); + void setOrderedItems (final List orderedItems); } diff --git a/src/org/mxchange/jshopcore/model/product/Product.java b/src/org/mxchange/jshopcore/model/product/Product.java index 365e38c..4598d0f 100644 --- a/src/org/mxchange/jshopcore/model/product/Product.java +++ b/src/org/mxchange/jshopcore/model/product/Product.java @@ -31,75 +31,75 @@ public interface Product extends Serializable { *

* @param product Source product */ - public void copyAll (final Product product); + void copyAll (final Product product); /** * Getter for product availability *

* @return Product availability */ - public Boolean getProductAvailability (); + Boolean getProductAvailability (); /** * Setter for product availability *

* @param productAvailability Product availability */ - public void setProductAvailability (final Boolean productAvailability); + void setProductAvailability (final Boolean productAvailability); /** * Getter for product category id *

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

* @param productCategory Product category */ - public void setProductCategory (final Category productCategory); + void setProductCategory (final Category productCategory); /** * Getter for id number, suitable for form fields. *

* @return Id number of product */ - public Long getProductId (); + Long getProductId (); /** * Id number of product *

* @param productId the id number to set */ - public void setProductId (final Long productId); + void setProductId (final Long productId); /** * Getter for raw price. *

* @return Single price of product */ - public Float getProductPrice (); + Float getProductPrice (); /** * Price of product *

* @param productPrice the price to set */ - public void setProductPrice (final Float productPrice); + void setProductPrice (final Float productPrice); /** * Getter for title. *

* @return Title of product */ - public String getProductTitle (); + String getProductTitle (); /** * Title of product *

* @param productTitle the title to set */ - public void setProductTitle (final String productTitle); + void setProductTitle (final String productTitle); } diff --git a/src/org/mxchange/jshopcore/wrapper/WrapableCheckout.java b/src/org/mxchange/jshopcore/wrapper/WrapableCheckout.java index a23f691..78dde40 100644 --- a/src/org/mxchange/jshopcore/wrapper/WrapableCheckout.java +++ b/src/org/mxchange/jshopcore/wrapper/WrapableCheckout.java @@ -33,26 +33,26 @@ public interface WrapableCheckout extends Serializable { *

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

* @param customer Customer instance */ - public void setCustomer (final Customer customer); + void setCustomer (final Customer customer); /** * Getter for a List of AddableBasktem instances *

* @return List with AddableBasketItem instances */ - public List getList (); + List getList (); /** * Setter for a List of AddableBasktem instances *

* @param list List with AddableBasketItem instances */ - public void setList (final List list); + void setList (final List list); } -- 2.39.5