X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FPostReplyProvider.java;h=5decdc7416ef58f46008663e0c117c45fb03dd35;hb=5eccbebb663ee7c2098ce93a5aa3834376f8e566;hp=ddf3317cb6cd6b5752af31f831b242fca3bb62d3;hpb=729754c92273a07c31137d3740e2657bad10a898;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/core/PostReplyProvider.java b/src/main/java/net/pterodactylus/sone/core/PostReplyProvider.java
index ddf3317..5decdc7 100644
--- a/src/main/java/net/pterodactylus/sone/core/PostReplyProvider.java
+++ b/src/main/java/net/pterodactylus/sone/core/PostReplyProvider.java
@@ -17,28 +17,36 @@
package net.pterodactylus.sone.core;
+import java.util.List;
+
+import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.PostReply;
+import com.google.common.base.Optional;
+
/**
- * Interface for objects that can provide {@link PostReply}s by their ID.
+ * Interface for objects that can provide {@link PostReply}s.
*
* @author David âBombeâ Roden
*/
public interface PostReplyProvider {
/**
- * Returns the post reply with the given ID, if it exists. If it does not
- * exist and {@code create} is {@code false}, {@code null} is returned;
- * otherwise, a new post reply with the given ID is created and returned.
+ * Returns the reply with the given ID.
+ *
+ * @param id
+ * The ID of the reply to get
+ * @return The reply, or {@code null} if there is no such reply
+ */
+ public Optional getPostReply(String id);
+
+ /**
+ * Returns all replies for the given post, order ascending by time.
*
- * @param replyId
- * The ID of the post reply to return
- * @param create
- * {@code true} to create a new post reply if no post reply with
- * the given ID exists, {@code false} to return {@code null}
- * instead
- * @return The post reply with the given ID, or {@code null}
+ * @param post
+ * The post to get all replies for
+ * @return All replies for the given post
*/
- public PostReply getPostReply(String replyId, boolean create);
+ public List getReplies(Post post);
}