Removed extraneous information from DB events.

This commit is contained in:
akwizgran
2013-03-18 22:10:16 +00:00
parent 935b82a8f4
commit b280e4cbcd
3 changed files with 15 additions and 20 deletions

View File

@@ -1,20 +1,20 @@
package net.sf.briar.api.db.event;
import net.sf.briar.api.messaging.Message;
import net.sf.briar.api.messaging.GroupId;
/** An event that is broadcast when a group message is added to the database. */
public class GroupMessageAddedEvent extends DatabaseEvent {
private final Message message;
private final GroupId groupId;
private final boolean incoming;
public GroupMessageAddedEvent(Message message, boolean incoming) {
this.message = message;
public GroupMessageAddedEvent(GroupId groupId, boolean incoming) {
this.groupId = groupId;
this.incoming = incoming;
}
public Message getMessage() {
return message;
public GroupId getGroupId() {
return groupId;
}
public boolean isIncoming() {

View File

@@ -1,28 +1,20 @@
package net.sf.briar.api.db.event;
import net.sf.briar.api.ContactId;
import net.sf.briar.api.messaging.Message;
/**
* An event that is broadcast when a private message is added to the database.
*/
public class PrivateMessageAddedEvent extends DatabaseEvent {
private final Message message;
private final ContactId contactId;
private final boolean incoming;
public PrivateMessageAddedEvent(Message message, ContactId contactId,
boolean incoming) {
this.message = message;
public PrivateMessageAddedEvent(ContactId contactId, boolean incoming) {
this.contactId = contactId;
this.incoming = incoming;
}
public Message getMessage() {
return message;
}
public ContactId getContactId() {
return contactId;
}