Blog Client Implementation
A BSP Client similar to the ForumManager
should be written that allows the user to
- create a new blog
- add posts to the blog
- get all blogs to be shown in the UI
- get blog posts for one blog
Here's an initial sketch of how the interface could look like:
ClientId getClientId();
void addBlog(Blog b) throws DbException;
void addLocalPost(BlogPost p) throws DbException;
Blog getBlog(GroupId g) throws DbException;
Blog getBlog(Transaction txn, GroupId g) throws DbException;
Collection<Blog> getBlogs() throws DbException;
Collection<BlogPost> getBlogPosts(Blog b) throws DbException;
void registerRemoveBlogHook(RemoveBlogHook hook);
interface RemoveBlogHook {
void removingBlog(Transaction txn, Blog b) throws DbException;
}
Open Questions
- Should it be possible to delete a blog and if yes, how will all subscribers be informed about it?
- Do we split
BlogPost
in a blog header and a blog body like done for private and forum messages?