]> git.mxchange.org Git - jcustomer-core.git/commitdiff
fixed tpzo
authorRoland Häder <roland@mxchange.org>
Sun, 6 Aug 2017 19:45:26 +0000 (21:45 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 6 Aug 2017 19:45:26 +0000 (21:45 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcustomercore/events/customer/created/CreatedCustomerEvent.java [new file with mode: 0644]
src/org/mxchange/jcustomercore/events/customer/created/ObservableCreatedCustomerEvent.java [new file with mode: 0644]

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 (file)
index 0000000..b46c43c
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+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.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+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
+        * <p>
+        * @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 (file)
index 0000000..c2938b8
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2017 Roland Haeder<roland@mxchange.org>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+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.
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface ObservableCreatedCustomerEvent extends Serializable {
+
+       /**
+        * Getter for created customer instance
+        * <p>
+        * @return Created customer instance
+        */
+       Customer getCreatedCustomer ();
+
+}