Merge branch '681-convert-forum-post-bodies-to-strings-remove-content-type' into 'master'

Remove forum content type and change bodies to string

Also removes support for anonymous forum posts.

This MR depends on !360.

Closes #698, #681

See merge request !370
This commit is contained in:
akwizgran
2016-10-31 21:34:24 +00:00
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;
}