From: David ‘Bombe’ Roden Date: Tue, 22 Jan 2013 11:58:55 +0000 (+0100) Subject: Add method to get posts directed at a certain Sone to post provider interface. X-Git-Tag: 0.8.5^2~3^2~45^2~3 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=aa43230316c235b835f326cfcb2fd5230d63677b Add method to get posts directed at a certain Sone to post provider interface. --- 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); + }