Addressing second round of review issues

This commit is contained in:
Torsten Grote
2016-10-19 09:03:48 -02:00
parent 0523c4e718
commit 8f882dc910
26 changed files with 167 additions and 164 deletions

View File

@@ -7,9 +7,9 @@ import org.briarproject.api.sharing.Shareable;
import org.briarproject.api.sync.Group;
import org.jetbrains.annotations.NotNull;
import javax.annotation.concurrent.ThreadSafe;
import javax.annotation.concurrent.Immutable;
@ThreadSafe
@Immutable
@NotNullByDefault
public class Blog extends BaseGroup implements Shareable {

View File

@@ -5,9 +5,9 @@ import org.briarproject.api.sync.Group;
import org.briarproject.api.sync.GroupId;
import org.jetbrains.annotations.NotNull;
import javax.annotation.concurrent.ThreadSafe;
import javax.annotation.concurrent.Immutable;
@ThreadSafe
@Immutable
@NotNullByDefault
public abstract class BaseGroup {

View File

@@ -4,9 +4,9 @@ import org.briarproject.api.nullsafety.NotNullByDefault;
import org.briarproject.api.sync.Group;
import org.jetbrains.annotations.NotNull;
import javax.annotation.concurrent.ThreadSafe;
import javax.annotation.concurrent.Immutable;
@ThreadSafe
@Immutable
@NotNullByDefault
public abstract class NamedGroup extends BaseGroup {

View File

@@ -5,9 +5,9 @@ import org.briarproject.api.nullsafety.NotNullByDefault;
import org.briarproject.api.sharing.Shareable;
import org.briarproject.api.sync.Group;
import javax.annotation.concurrent.ThreadSafe;
import javax.annotation.concurrent.Immutable;
@ThreadSafe
@Immutable
@NotNullByDefault
public class Forum extends NamedGroup implements Shareable {

View File

@@ -1,8 +1,10 @@
package org.briarproject.api.forum;
import org.briarproject.api.clients.MessageTracker;
import org.briarproject.api.crypto.CryptoExecutor;
import org.briarproject.api.db.DbException;
import org.briarproject.api.db.Transaction;
import org.briarproject.api.identity.LocalAuthor;
import org.briarproject.api.sync.ClientId;
import org.briarproject.api.sync.GroupId;
import org.briarproject.api.sync.MessageId;
@@ -22,8 +24,9 @@ public interface ForumManager extends MessageTracker {
void removeForum(Forum f) throws DbException;
/** Creates a local forum post. */
ForumPost createLocalPost(GroupId groupId, String text,
@Nullable MessageId parentId) throws DbException;
@CryptoExecutor
ForumPost createLocalPost(GroupId groupId, String body, long timestamp,
@Nullable MessageId parentId, LocalAuthor author);
/** Stores a local forum post. */
ForumPostHeader addLocalPost(ForumPost p) throws DbException;

View File

@@ -6,9 +6,9 @@ import org.briarproject.api.nullsafety.NotNullByDefault;
import org.briarproject.api.sync.Group;
import org.jetbrains.annotations.NotNull;
import javax.annotation.concurrent.ThreadSafe;
import javax.annotation.concurrent.Immutable;
@ThreadSafe
@Immutable
@NotNullByDefault
public class PrivateGroup extends NamedGroup {

View File

@@ -3,6 +3,7 @@ package org.briarproject.api.privategroup;
import org.briarproject.api.clients.MessageTracker;
import org.briarproject.api.db.DbException;
import org.briarproject.api.db.Transaction;
import org.briarproject.api.identity.LocalAuthor;
import org.briarproject.api.sync.ClientId;
import org.briarproject.api.sync.GroupId;
import org.briarproject.api.sync.MessageId;
@@ -21,8 +22,8 @@ public interface PrivateGroupManager extends MessageTracker {
void removePrivateGroup(GroupId g) throws DbException;
/** Creates a local group message. */
GroupMessage createLocalMessage(GroupId groupId, String text,
@Nullable MessageId parentId) throws DbException;
GroupMessage createLocalMessage(GroupId groupId, String body,
long timestamp, @Nullable MessageId parentId, LocalAuthor author);
/** Stores (and sends) a local group message. */
GroupMessageHeader addLocalMessage(GroupMessage p) throws DbException;