Added option to delete messages - for now only for the client locally
This commit is contained in:
34
common/src/main/java/envoy/event/MessageDeletion.java
Normal file
34
common/src/main/java/envoy/event/MessageDeletion.java
Normal file
@ -0,0 +1,34 @@
|
||||
package envoy.event;
|
||||
|
||||
/**
|
||||
* Conveys the deletion of a message between clients and server.
|
||||
*
|
||||
* @author Leon Hofmeister
|
||||
* @since Envoy Common v0.3-beta
|
||||
*/
|
||||
public class MessageDeletion extends Event<Long> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private transient boolean ownEvent;
|
||||
|
||||
/**
|
||||
* @param messageID the ID of the deleted message
|
||||
* @since Envoy Common v0.3-beta
|
||||
*/
|
||||
public MessageDeletion(long messageID) { super(messageID); }
|
||||
|
||||
/**
|
||||
* @return whether the current user was the creator of this event.
|
||||
* @since Envoy Common v0.3-beta
|
||||
*/
|
||||
public boolean isOwnEvent() { return ownEvent; }
|
||||
|
||||
/**
|
||||
* Marks this event as being sent by this user. Is needed for a bug free
|
||||
* and efficient selection clearing.
|
||||
*
|
||||
* @since Envoy Common v0.3-beta
|
||||
*/
|
||||
public void setOwnEvent() { ownEvent = true; }
|
||||
}
|
Reference in New Issue
Block a user