]> git.mxchange.org Git - jcontacts-core.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Sat, 5 Aug 2017 14:57:09 +0000 (16:57 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 6 Aug 2017 19:44:38 +0000 (21:44 +0200)
- added events being fired when a contact instance has been created
- updated jar(s)

Signed-off-by: Roland Häder <roland@mxchange.org>
lib/jphone-core.jar
src/org/mxchange/jcontacts/events/contact/created/CreatedContactEvent.java [new file with mode: 0644]
src/org/mxchange/jcontacts/events/contact/created/ObservableCreatedContactEvent.java [new file with mode: 0644]

index c26881aca177c269466cbbe99109ae447c9db073..e02fe6449c20b81d3ab78ce994272454a410dfb6 100644 (file)
Binary files a/lib/jphone-core.jar and b/lib/jphone-core.jar differ
diff --git a/src/org/mxchange/jcontacts/events/contact/created/CreatedContactEvent.java b/src/org/mxchange/jcontacts/events/contact/created/CreatedContactEvent.java
new file mode 100644 (file)
index 0000000..29d69e1
--- /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.jcontacts.events.contact.created;
+
+import org.mxchange.jcontacts.contact.Contact;
+
+/**
+ * An interface for observable events being fired when a contact instance has
+ * been successfully created. This may happen when a contact profile was called.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class CreatedContactEvent implements ObservableCreatedContactEvent {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 24_138_056_876_716_451L;
+
+       /**
+        * Contact instance being created
+        */
+       private final Contact createdContact;
+
+       /**
+        * Constructor with contact instance
+        * <p>
+        * @param createdContact Contact instance being created by helper
+        */
+       public CreatedContactEvent (final Contact createdContact) {
+               // Set contact instance
+               this.createdContact = createdContact;
+       }
+
+       @Override
+       public Contact getCreatedContact () {
+               return this.createdContact;
+       }
+
+}
diff --git a/src/org/mxchange/jcontacts/events/contact/created/ObservableCreatedContactEvent.java b/src/org/mxchange/jcontacts/events/contact/created/ObservableCreatedContactEvent.java
new file mode 100644 (file)
index 0000000..c386d68
--- /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.jcontacts.events.contact.created;
+
+import java.io.Serializable;
+import org.mxchange.jcontacts.contact.Contact;
+
+/**
+ * An interface for observable events being fired when a contact instance has
+ * been successfully created. This may happen when a contact profile was called.
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface ObservableCreatedContactEvent extends Serializable {
+
+       /**
+        * Getter for created contact instance
+        * <p>
+        * @return Created contact instance
+        */
+       Contact getCreatedContact ();
+
+}