Implemented GroupMessageStatusChangeEvent

This commit is contained in:
DieGurke 2020-04-18 16:36:50 +02:00
parent 373faae63b
commit 45e75dba41
2 changed files with 77 additions and 27 deletions

View File

@ -1,27 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="envoy-common">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="envoy-common">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
<wb-resource deploy-path="/" source-path="/src/test/java"/>
</wb-module>
</project-modules>

View File

@ -0,0 +1,44 @@
package envoy.event;
import java.util.Date;
import envoy.data.GroupMessage;
import envoy.data.Message.MessageStatus;
/**
* Project: <strong>envoy-common</strong><br>
* File: <strong>GroupMessageStatusChangeEvent.java</strong><br>
* Created: <strong>18.04.2020</strong><br>
*
* @author Maximilian K&auml;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); }
}