From 45e75dba418d5ec697f0b34c6d50ea862b4583b6 Mon Sep 17 00:00:00 2001
From: DieGurke <55625494+DieGurke@users.noreply.github.com>
Date: Sat, 18 Apr 2020 16:36:50 +0200
Subject: [PATCH] Implemented GroupMessageStatusChangeEvent
---
.settings/org.eclipse.wst.common.component | 60 ++++++++++---------
.../event/GroupMessageStatusChangeEvent.java | 44 ++++++++++++++
2 files changed, 77 insertions(+), 27 deletions(-)
create mode 100644 src/main/java/envoy/event/GroupMessageStatusChangeEvent.java
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index 1dda271..9cb8af1 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -1,27 +1,33 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/envoy/event/GroupMessageStatusChangeEvent.java b/src/main/java/envoy/event/GroupMessageStatusChangeEvent.java
new file mode 100644
index 0000000..8e0f3e7
--- /dev/null
+++ b/src/main/java/envoy/event/GroupMessageStatusChangeEvent.java
@@ -0,0 +1,44 @@
+package envoy.event;
+
+import java.util.Date;
+
+import envoy.data.GroupMessage;
+import envoy.data.Message.MessageStatus;
+
+/**
+ * Project: envoy-common
+ * File: GroupMessageStatusChangeEvent.java
+ * Created: 18.04.2020
+ *
+ * @author Maximilian Käfer
+ * @since Envoy Common v0.1-beta
+ */
+public class GroupMessageStatusChangeEvent extends MessageStatusChangeEvent {
+
+ private final long memberID;
+
+ private static final long serialVersionUID = 0L;
+
+ /**
+ * Initializes a {@link GroupMessageStatusChangeEvent}.
+ *
+ * @param id the ID of the {@link GroupMessage} this event is related to
+ * @param status the status of this specific members {@link GroupMessage}.
+ * @param date the date at which the MessageStatus change occurred for this
+ * specific member
+ * @since Envoy Common v0.1-beta
+ */
+ public GroupMessageStatusChangeEvent(long id, MessageStatus status, Date date, long memberID) {
+ super(id, status, date);
+ this.memberID = memberID;
+ }
+
+ /**
+ * @return the memberID which the user who sends this event has
+ * @since Envoy Common v0.1-beta
+ */
+ public long getMemberID() { return memberID; }
+
+ @Override
+ public String toString() { return String.format("GroupMessageStatusChangeEvent[meta=%s, memberID=%d]", super.toString(), memberID); }
+}