From 54c481c6e638fd683277c3bfe00bd760df9a2169 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 6 Aug 2017 21:45:26 +0200 Subject: [PATCH] fixed tpzo MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../created/CreatedCustomerEvent.java | 54 +++++++++++++++++++ .../ObservableCreatedCustomerEvent.java | 37 +++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 src/org/mxchange/jcustomercore/events/customer/created/CreatedCustomerEvent.java create mode 100644 src/org/mxchange/jcustomercore/events/customer/created/ObservableCreatedCustomerEvent.java diff --git a/src/org/mxchange/jcustomercore/events/customer/created/CreatedCustomerEvent.java b/src/org/mxchange/jcustomercore/events/customer/created/CreatedCustomerEvent.java new file mode 100644 index 0000000..b46c43c --- /dev/null +++ b/src/org/mxchange/jcustomercore/events/customer/created/CreatedCustomerEvent.java @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2017 Roland Häder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcustomercore.events.customer.created; + +import org.mxchange.jcustomercore.model.customer.Customer; + +/** + * An interface for observable events being fired when a customer instance has + * been successfully created. This may happen when a customer profile was called. + *

+ * @author Roland Häder + */ +public class CreatedCustomerEvent implements ObservableCreatedCustomerEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 24_138_056_876_716_451L; + + /** + * Customer instance being created + */ + private final Customer createdCustomer; + + /** + * Constructor with customer instance + *

+ * @param createdCustomer Customer instance being created by helper + */ + public CreatedCustomerEvent (final Customer createdCustomer) { + // Set customer instance + this.createdCustomer = createdCustomer; + } + + @Override + public Customer getCreatedCustomer () { + return this.createdCustomer; + } + +} diff --git a/src/org/mxchange/jcustomercore/events/customer/created/ObservableCreatedCustomerEvent.java b/src/org/mxchange/jcustomercore/events/customer/created/ObservableCreatedCustomerEvent.java new file mode 100644 index 0000000..c2938b8 --- /dev/null +++ b/src/org/mxchange/jcustomercore/events/customer/created/ObservableCreatedCustomerEvent.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2017 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcustomercore.events.customer.created; + +import java.io.Serializable; +import org.mxchange.jcustomercore.model.customer.Customer; + +/** + * An interface for observable events being fired when a customer instance has + * been successfully created. This may happen when a customer profile was called. + *

+ * @author Roland Haeder + */ +public interface ObservableCreatedCustomerEvent extends Serializable { + + /** + * Getter for created customer instance + *

+ * @return Created customer instance + */ + Customer getCreatedCustomer (); + +} -- 2.39.5