From e8e813b99a7945130099845190efc4fca16b13bf Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 30 Oct 2010 01:35:24 +0200 Subject: [PATCH] =?utf8?q?Implement=20delegate=20methods=20to=20add=20and?= =?utf8?q?=20remove=20contexts=20from=20OwnIdentity=E2=80=99s.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../net/pterodactylus/sone/freenet/wot/OwnIdentity.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/OwnIdentity.java b/src/main/java/net/pterodactylus/sone/freenet/wot/OwnIdentity.java index ecb8f25..a8f24cb 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/OwnIdentity.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/OwnIdentity.java @@ -65,10 +65,13 @@ public class OwnIdentity extends Identity { * * @param context * The context to add + * @throws PluginException + * if an error occured communicating with the Web of Trust + * plugin */ - public void addContext(String context) { + public void addContext(String context) throws PluginException { if (getContexts().add(context)) { - /* TODO - add. */ + webOfTrustConnector.addContext(this, context); } } @@ -77,10 +80,13 @@ public class OwnIdentity extends Identity { * * @param context * The context to remove + * @throws PluginException + * if an error occured communicating with the Web of Trust + * plugin */ - public void removeContext(String context) { + public void removeContext(String context) throws PluginException { if (getContexts().remove(context)) { - /* TODO - remove */ + webOfTrustConnector.removeContext(this, context); } } -- 2.7.4