From f43a6b87a0aaa0935977622cc079e7d6b33b9030 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 20 Oct 2010 07:21:34 +0200 Subject: [PATCH] Add method to delete a reply. --- src/main/java/net/pterodactylus/sone/core/Core.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 // -- 2.7.4