Remove forum content type and move bodies to string

Also removes support for anonymous forum posts.
Closes #698
This commit is contained in:
Torsten Grote
2016-10-27 11:24:33 -02:00
parent c0aa255bb6
commit 5ce8b1978d
10 changed files with 81 additions and 124 deletions

View File

@@ -41,7 +41,7 @@ public interface ForumManager extends MessageTracker {
Collection<Forum> getForums() throws DbException;
/** Returns the body of the forum post with the given ID. */
byte[] getPostBody(MessageId m) throws DbException;
String getPostBody(MessageId m) throws DbException;
/** Returns the headers of all posts in the given forum. */
Collection<ForumPostHeader> getPostHeaders(GroupId g) throws DbException;

View File

@@ -1,6 +1,7 @@
package org.briarproject.api.forum;
import org.briarproject.api.FormatException;
import org.briarproject.api.crypto.CryptoExecutor;
import org.briarproject.api.identity.LocalAuthor;
import org.briarproject.api.sync.GroupId;
import org.briarproject.api.sync.MessageId;
@@ -9,11 +10,9 @@ import java.security.GeneralSecurityException;
public interface ForumPostFactory {
ForumPost createAnonymousPost(GroupId groupId, long timestamp,
MessageId parent, String contentType, byte[] body)
throws FormatException;
ForumPost createPseudonymousPost(GroupId groupId, long timestamp,
MessageId parent, LocalAuthor author, String body)
@CryptoExecutor
ForumPost createPost(GroupId groupId, long timestamp, MessageId parent,
LocalAuthor author, String body)
throws FormatException, GeneralSecurityException;
}