From: Roland Häder Date: Wed, 19 Apr 2017 17:43:08 +0000 (+0200) Subject: nope, better set the entire checkout-wrapper object than only customer X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=525a52fe09ee65d8c2282e5dc2a96f44996cefc6;p=jshop-core.git nope, better set the entire checkout-wrapper object than only customer Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jshopcore/events/ObservableCheckoutCompletedEvent.java b/src/org/mxchange/jshopcore/events/ObservableCheckoutCompletedEvent.java index 6b26263..3c11be5 100644 --- a/src/org/mxchange/jshopcore/events/ObservableCheckoutCompletedEvent.java +++ b/src/org/mxchange/jshopcore/events/ObservableCheckoutCompletedEvent.java @@ -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 *

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

- * @param customer Customer instance - */ - void setCustomer (final Customer customer); + WrapableCheckout getWrapper (); } diff --git a/src/org/mxchange/jshopcore/events/ShopCheckoutCompletedEvent.java b/src/org/mxchange/jshopcore/events/ShopCheckoutCompletedEvent.java index 92a1f7c..98a9e02 100644 --- a/src/org/mxchange/jshopcore/events/ShopCheckoutCompletedEvent.java +++ b/src/org/mxchange/jshopcore/events/ShopCheckoutCompletedEvent.java @@ -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 *

- * @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; } }