Change Blog Paradigm to Short-Form

Removes teaser and makes body mandatory.

It also adds support for deleting blogs and
introduces a getAuthorStatus() method to the IdentityManager
that takes a running transaction.
This commit is contained in:
Torsten Grote
2016-06-20 16:00:05 -03:00
parent 5a9615265e
commit 30fe9f6e2a
13 changed files with 203 additions and 114 deletions

View File

@@ -1,6 +1,5 @@
package org.briarproject.api.blogs;
import org.briarproject.api.FormatException;
import org.briarproject.api.db.DbException;
import org.briarproject.api.db.Transaction;
import org.briarproject.api.identity.LocalAuthor;
@@ -20,6 +19,9 @@ public interface BlogManager {
Blog addBlog(LocalAuthor localAuthor, String name, String description)
throws DbException;
/** Removes and deletes a blog. */
void removeBlog(Blog b) throws DbException;
/** Stores a local blog post. */
void addLocalPost(BlogPost p) throws DbException;
@@ -45,4 +47,11 @@ public interface BlogManager {
/** Marks a blog post as read or unread. */
void setReadFlag(MessageId m, boolean read) throws DbException;
/** Registers a hook to be called whenever a blog is removed. */
void registerRemoveBlogHook(RemoveBlogHook hook);
interface RemoveBlogHook {
void removingBlog(Transaction txn, Blog b) throws DbException;
}
}