Add method to get posts directed at a certain Sone to post provider interface.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 22 Jan 2013 11:58:55 +0000 (12:58 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 22 Jan 2013 11:58:55 +0000 (12:58 +0100)
src/main/java/net/pterodactylus/sone/core/PostProvider.java

index e7167cd..d97a7ce 100644 (file)
@@ -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<Post> getDirectedPosts(String recipientId);
+
 }