]> git.mxchange.org Git - jshop-core.git/commitdiff
nope, better set the entire checkout-wrapper object than only customer
authorRoland Häder <roland@mxchange.org>
Wed, 19 Apr 2017 17:43:08 +0000 (19:43 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 19 Apr 2017 17:43:08 +0000 (19:43 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jshopcore/events/ObservableCheckoutCompletedEvent.java
src/org/mxchange/jshopcore/events/ShopCheckoutCompletedEvent.java

index 6b2626377b3fc8efbd35f524a886dd74c3bd9696..3c11be5aa2113575cae7842375fdc0d78ef6517d 100644 (file)
@@ -17,7 +17,7 @@
 package org.mxchange.jshopcore.events;
 
 import java.io.Serializable;
-import org.mxchange.jcustomercore.model.customer.Customer;
+import org.mxchange.jshopcore.wrapper.WrapableCheckout;
 
 /**
  * An observable event being fired when a checkout is completed.
@@ -27,17 +27,10 @@ import org.mxchange.jcustomercore.model.customer.Customer;
 public interface ObservableCheckoutCompletedEvent extends Serializable {
 
        /**
-        * Getter for customer instance
+        * Getter for checkout-wrapper instance
         * <p>
-        * @return Customer instance
+        * @return Checkout-wrapper instance
         */
-       Customer getCustomer ();
-
-       /**
-        * Setter for customer instance
-        * <p>
-        * @param customer Customer instance
-        */
-       void setCustomer (final Customer customer);
+       WrapableCheckout getWrapper ();
 
 }
index 92a1f7c5a23805d600ccda31b21c123b4d6c0f8f..98a9e02e664d109d4766ad6ede5ca67f24ea9df0 100644 (file)
@@ -16,7 +16,7 @@
  */
 package org.mxchange.jshopcore.events;
 
-import org.mxchange.jcustomercore.model.customer.Customer;
+import org.mxchange.jshopcore.wrapper.WrapableCheckout;
 
 /**
  * An event being fired when a checkout is completed by user
@@ -31,27 +31,22 @@ public class ShopCheckoutCompletedEvent implements ObservableCheckoutCompletedEv
        private static final long serialVersionUID = 16_018_592_482_985_714L;
 
        /**
-        * Customer instance
+        * Checkout wrapper
         */
-       private Customer customer;
+       private final WrapableCheckout wrapper;
 
        /**
-        * Constructor with customer instance
+        * Constructor with checkout wrapper
         * <p>
-        * @param customer Customer instance
+        * @param wrapper Checkout wrapper
         */
-       public ShopCheckoutCompletedEvent (final Customer customer) {
-               this.customer = customer;
+       public ShopCheckoutCompletedEvent (final WrapableCheckout wrapper) {
+               this.wrapper = wrapper;
        }
 
        @Override
-       public Customer getCustomer () {
-               return this.customer;
-       }
-
-       @Override
-       public void setCustomer (final Customer customer) {
-               this.customer = customer;
+       public WrapableCheckout getWrapper () {
+               return this.wrapper;
        }
 
 }