From: David ‘Bombe’ Roden Date: Fri, 29 Oct 2010 23:35:24 +0000 (+0200) Subject: Implement delegate methods to add and remove contexts from OwnIdentity’s. X-Git-Tag: 0.2-RC1~86 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=e8e813b99a7945130099845190efc4fca16b13bf Implement delegate methods to add and remove contexts from OwnIdentity’s. --- 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); } }