Removed peer moderation (may be restored after beta testing).

This commit is contained in:
akwizgran
2013-09-27 18:04:27 +01:00
parent b94954544d
commit 0a153acd02
16 changed files with 80 additions and 1020 deletions

View File

@@ -20,7 +20,6 @@ import net.sf.briar.api.messaging.GroupStatus;
import net.sf.briar.api.messaging.Message;
import net.sf.briar.api.messaging.MessageId;
import net.sf.briar.api.messaging.Offer;
import net.sf.briar.api.messaging.Rating;
import net.sf.briar.api.messaging.Request;
import net.sf.briar.api.messaging.RetentionAck;
import net.sf.briar.api.messaging.RetentionUpdate;
@@ -204,9 +203,6 @@ public interface DatabaseComponent {
Collection<PrivateMessageHeader> getPrivateMessageHeaders(ContactId c)
throws DbException;
/** Returns the user's rating for the given author. */
Rating getRating(AuthorId a) throws DbException;
/** Returns true if the given message has been read. */
boolean getReadFlag(MessageId m) throws DbException;
@@ -313,9 +309,6 @@ public interface DatabaseComponent {
void setConnectionWindow(ContactId c, TransportId t, long period,
long centre, byte[] bitmap) throws DbException;
/** Records the user's rating for the given author. */
void setRating(AuthorId a, Rating r) throws DbException;
/**
* Marks the given message read or unread and returns true if it was
* previously read.

View File

@@ -3,7 +3,6 @@ package net.sf.briar.api.db;
import net.sf.briar.api.Author;
import net.sf.briar.api.messaging.GroupId;
import net.sf.briar.api.messaging.MessageId;
import net.sf.briar.api.messaging.Rating;
public class GroupMessageHeader extends MessageHeader {
@@ -11,9 +10,9 @@ public class GroupMessageHeader extends MessageHeader {
public GroupMessageHeader(MessageId id, MessageId parent, Author author,
String contentType, String subject, long timestamp, boolean read,
boolean starred, Rating rating, GroupId groupId) {
boolean starred, GroupId groupId) {
super(id, parent, author, contentType, subject, timestamp, read,
starred, rating);
starred);
this.groupId = groupId;
}

View File

@@ -2,7 +2,6 @@ package net.sf.briar.api.db;
import net.sf.briar.api.Author;
import net.sf.briar.api.messaging.MessageId;
import net.sf.briar.api.messaging.Rating;
public abstract class MessageHeader {
@@ -11,11 +10,10 @@ public abstract class MessageHeader {
private final String contentType, subject;
private final long timestamp;
private final boolean read, starred;
private final Rating rating;
protected MessageHeader(MessageId id, MessageId parent, Author author,
String contentType, String subject, long timestamp, boolean read,
boolean starred, Rating rating) {
boolean starred) {
this.id = id;
this.parent = parent;
this.author = author;
@@ -24,7 +22,6 @@ public abstract class MessageHeader {
this.timestamp = timestamp;
this.read = read;
this.starred = starred;
this.rating = rating;
}
/** Returns the message's unique identifier. */
@@ -71,12 +68,4 @@ public abstract class MessageHeader {
public boolean isStarred() {
return starred;
}
/**
* Returns the rating for the message's author, or Rating.UNRATED if this
* is an anonymous message.
*/
public Rating getRating() {
return rating;
}
}

View File

@@ -3,7 +3,6 @@ package net.sf.briar.api.db;
import net.sf.briar.api.Author;
import net.sf.briar.api.ContactId;
import net.sf.briar.api.messaging.MessageId;
import net.sf.briar.api.messaging.Rating;
public class PrivateMessageHeader extends MessageHeader {
@@ -12,10 +11,9 @@ public class PrivateMessageHeader extends MessageHeader {
public PrivateMessageHeader(MessageId id, MessageId parent, Author author,
String contentType, String subject, long timestamp, boolean read,
boolean starred, Rating rating, ContactId contactId,
boolean incoming) {
boolean starred, ContactId contactId, boolean incoming) {
super(id, parent, author, contentType, subject, timestamp, read,
starred, rating);
starred);
this.contactId = contactId;
this.incoming = incoming;
}

View File

@@ -1,23 +0,0 @@
package net.sf.briar.api.db.event;
import net.sf.briar.api.AuthorId;
import net.sf.briar.api.messaging.Rating;
public class RatingChangedEvent extends DatabaseEvent {
private final AuthorId author;
private final Rating rating;
public RatingChangedEvent(AuthorId author, Rating rating) {
this.author = author;
this.rating = rating;
}
public AuthorId getAuthorId() {
return author;
}
public Rating getRating() {
return rating;
}
}

View File

@@ -1,6 +0,0 @@
package net.sf.briar.api.messaging;
/** The ratings that may be applied to an author in peer moderation. */
public enum Rating {
UNRATED, BAD, GOOD
}