From aa43230316c235b835f326cfcb2fd5230d63677b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 22 Jan 2013 12:58:55 +0100 Subject: [PATCH] Add method to get posts directed at a certain Sone to post provider interface. --- src/main/java/net/pterodactylus/sone/core/PostProvider.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/core/PostProvider.java b/src/main/java/net/pterodactylus/sone/core/PostProvider.java index e7167cd..d97a7ce 100644 --- a/src/main/java/net/pterodactylus/sone/core/PostProvider.java +++ b/src/main/java/net/pterodactylus/sone/core/PostProvider.java @@ -17,6 +17,8 @@ package net.pterodactylus.sone.core; +import java.util.Collection; + import net.pterodactylus.sone.data.Post; /** @@ -35,4 +37,14 @@ public interface PostProvider { */ public Post getPost(String postId); + /** + * Returns all posts that have the given Sone as recipient. + * + * @see Post#getRecipient() + * @param recipientId + * The ID of the recipient of the posts + * @return All posts that have the given Sone as recipient + */ + public Collection getDirectedPosts(String recipientId); + } -- 2.7.4