Added date to the MessageStatusChangedEvent
time of the Event can now be saved
This commit is contained in:
parent
6fcfaee1ab
commit
1d42f57352
@ -1,5 +1,7 @@
|
||||
package envoy.event;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import envoy.data.Message;
|
||||
|
||||
/**
|
||||
@ -14,6 +16,7 @@ public class MessageStatusChangeEvent implements Event<Message.MessageStatus> {
|
||||
|
||||
private final long messageId;
|
||||
private final Message.MessageStatus messageStatus;
|
||||
private final Date date;
|
||||
|
||||
/**
|
||||
* Initializes a {@link MessageStatusChangeEvent}.
|
||||
@ -21,11 +24,13 @@ public class MessageStatusChangeEvent implements Event<Message.MessageStatus> {
|
||||
* @param messageId the ID of the {@link Message} this event is related to
|
||||
* @param messageStatus the status of the {@link Message} this event is related
|
||||
* to
|
||||
* @param date the date at which the MessageStatus change occurred
|
||||
* @since Envoy Common v0.2-alpha
|
||||
*/
|
||||
public MessageStatusChangeEvent(long messageId, Message.MessageStatus messageStatus) {
|
||||
public MessageStatusChangeEvent(long messageId, Message.MessageStatus messageStatus, Date date) {
|
||||
this.messageId = messageId;
|
||||
this.messageStatus = messageStatus;
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -40,4 +45,10 @@ public class MessageStatusChangeEvent implements Event<Message.MessageStatus> {
|
||||
* @since Envoy Common v0.2-alpha
|
||||
*/
|
||||
public long getMessageId() { return messageId; }
|
||||
|
||||
/**
|
||||
* @return the date at which the messageStatus change occurred
|
||||
* @since Envoy Common v0.2-alpha
|
||||
*/
|
||||
public Date getDate() { return date; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user