Add method to delete a reply.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 20 Oct 2010 05:21:34 +0000 (07:21 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 20 Oct 2010 05:21:34 +0000 (07:21 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index 0f733b6..5493698 100644 (file)
@@ -522,6 +522,18 @@ public class Core extends AbstractService {
                return replies;
        }
 
+       /**
+        * Deletes the given reply. It is removed from its Sone and from the reply
+        * cache.
+        *
+        * @param reply
+        *            The reply to remove
+        */
+       public void deleteReply(Reply reply) {
+               reply.getSone().removeReply(reply);
+               replyCache.remove(reply.getId());
+       }
+
        //
        // SERVICE METHODS
        //