From: Roland Häder Date: Sun, 6 Aug 2017 19:45:26 +0000 (+0200) Subject: fixed tpzo X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=54c481c6e638fd683277c3bfe00bd760df9a2169;p=jcustomer-core.git fixed tpzo Signed-off-by: Roland Häder --- 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 (); + +}