From: David ‘Bombe’ Roden Date: Wed, 20 Oct 2010 05:21:34 +0000 (+0200) Subject: Add method to delete a reply. X-Git-Tag: 0.1-RC1~170 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f43a6b87a0aaa0935977622cc079e7d6b33b9030;p=Sone.git Add method to delete a reply. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 0f733b6..5493698 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -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 //