Add transactional versions of BlogManager methods

This commit is contained in:
Torsten Grote
2023-07-13 13:01:30 -03:00
parent c47253fc5f
commit 8f735d176e
2 changed files with 43 additions and 15 deletions

View File

@@ -74,6 +74,13 @@ public interface BlogManager {
@Nullable String comment, BlogPostHeader parentHeader)
throws DbException;
/**
* Adds a comment to an existing blog post or reblogs it.
*/
void addLocalComment(Transaction txn, LocalAuthor author,
GroupId groupId, @Nullable String comment,
BlogPostHeader parentHeader) throws DbException;
/**
* Returns the blog with the given ID.
*/
@@ -99,6 +106,11 @@ public interface BlogManager {
*/
Collection<Blog> getBlogs() throws DbException;
/**
* Returns all blogs to which the user subscribes.
*/
Collection<Blog> getBlogs(Transaction txn) throws DbException;
/**
* Returns the group IDs of all blogs to which the user subscribes.
*/
@@ -136,6 +148,11 @@ public interface BlogManager {
*/
void setReadFlag(MessageId m, boolean read) throws DbException;
/**
* Marks a blog post as read or unread.
*/
void setReadFlag(Transaction txn, MessageId m, boolean read) throws DbException;
/**
* Registers a hook to be called whenever a blog is removed.
*/