From 83e51753c5ddd721e9d0b5aeaf211653e564a5d9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 14 Nov 2010 17:10:53 +0100 Subject: [PATCH] Implement core listener interface. --- .../net/pterodactylus/sone/web/WebInterface.java | 32 +++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 1c429e7..f0a1fb6 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -30,6 +30,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import net.pterodactylus.sone.core.Core; +import net.pterodactylus.sone.core.CoreListener; import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.Reply; import net.pterodactylus.sone.data.Sone; @@ -85,7 +86,7 @@ import freenet.l10n.BaseL10n; * * @author David ‘Bombe’ Roden */ -public class WebInterface { +public class WebInterface implements CoreListener { /** The logger. */ private static final Logger logger = Logging.getLogger(WebInterface.class); @@ -332,6 +333,35 @@ public class WebInterface { } } + // + // CORELISTENER METHODS + // + + /** + * {@inheritDoc} + */ + @Override + public void newSoneFound(Sone sone) { + newSoneNotification.addSone(sone); + notificationManager.addNotification(newSoneNotification); + } + + /** + * {@inheritDoc} + */ + @Override + public void newPostFound(Post post) { + /* TODO */ + } + + /** + * {@inheritDoc} + */ + @Override + public void newReplyFound(Reply reply) { + /* TODO */ + } + /** * Template provider implementation that uses * {@link WebInterface#createReader(String)} to load templates for -- 2.7.4