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); } +}