mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
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:
@@ -1,43 +1,27 @@
|
||||
package org.briarproject.api.blogs;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import org.briarproject.api.forum.ForumPost;
|
||||
import org.briarproject.api.identity.Author;
|
||||
import org.briarproject.api.sync.Message;
|
||||
import org.briarproject.api.sync.MessageId;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class BlogPost extends ForumPost {
|
||||
|
||||
@Nullable
|
||||
private final String title;
|
||||
@NotNull
|
||||
private final String teaser;
|
||||
private final boolean hasBody;
|
||||
|
||||
public BlogPost(@Nullable String title, @NotNull String teaser,
|
||||
boolean hasBody, @NotNull Message message,
|
||||
@Nullable MessageId parent, @NotNull Author author,
|
||||
public BlogPost(@Nullable String title, @NotNull Message message,
|
||||
@Nullable MessageId parent, @NotNull Author author,
|
||||
@NotNull String contentType) {
|
||||
super(message, parent, author, contentType);
|
||||
|
||||
this.title = title;
|
||||
this.teaser = teaser;
|
||||
this.hasBody = hasBody;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getTeaser() {
|
||||
return teaser;
|
||||
}
|
||||
|
||||
public boolean hasBody() {
|
||||
return hasBody;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user