47 lines
1.8 KiB
Java
47 lines
1.8 KiB
Java
package envoy.data;
|
|
|
|
import java.util.Date;
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* Project: <strong>envoy-common</strong><br>
|
|
* File: <strong>GroupMessage.java</strong><br>
|
|
* Created: <strong>26.03.2020</strong><br>
|
|
*
|
|
* @author Maximilian Käfer
|
|
* @since Envoy Common v0.1-beta
|
|
*/
|
|
public final class GroupMessage extends Message {
|
|
|
|
private final Map<Long, MessageStatus> memberStatuses;
|
|
|
|
private static final long serialVersionUID = 0L;
|
|
|
|
/**
|
|
* Initializes a {@link GroupMessage} with values for all of its properties. The
|
|
* use
|
|
* of this constructor is only intended for the {@link MessageBuilder} class, as
|
|
* this class provides {@code null} checks and default values for all
|
|
* properties.
|
|
*
|
|
* @param id unique ID
|
|
* @param senderID the ID of the user who sends the message
|
|
* @param recipientID the ID of the user who receives the message
|
|
* @param creationDate the creation date of the message
|
|
* @param text the text content of the message
|
|
* @param attachment the attachment of the message, if present
|
|
* @param status the current {@link MessageStatus} of the message
|
|
* @param forwarded whether this message was forwarded
|
|
* @param memberStatuses a map of all members and their status according to this
|
|
* {@link GroupMessage}
|
|
* @since Envoy Common v0.1-beta
|
|
*/
|
|
GroupMessage(long id, long senderID, long groupID, Date creationDate, String text, MessageAttachment<?> attachment, MessageStatus status,
|
|
boolean forwarded, Map<Long, MessageStatus> memberStatuses) {
|
|
super(id, senderID, groupID, creationDate, text, attachment, status, forwarded);
|
|
this.memberStatuses = memberStatuses;
|
|
}
|
|
|
|
public Map<Long, MessageStatus> getMemberStatuses() { return memberStatuses; }
|
|
}
|