This repository has been archived on 2021-12-05. You can view files and clone it, but cannot push or open issues or pull requests.
envoy/common/src/main/java/envoy/event/MessageDeletion.java

35 lines
830 B
Java

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; }
}