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