From 525a52fe09ee65d8c2282e5dc2a96f44996cefc6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 19 Apr 2017 19:43:08 +0200 Subject: [PATCH] nope, better set the entire checkout-wrapper object than only customer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../ObservableCheckoutCompletedEvent.java | 15 ++++-------- .../events/ShopCheckoutCompletedEvent.java | 23 ++++++++----------- 2 files changed, 13 insertions(+), 25 deletions(-) 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; } } -- 2.39.5