From 5e6c39b23a0aa59d39cf7432c8763a37c839de91 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:29:29 +0200 Subject: [PATCH] Move property manipulation to OwnIdentity. --- .../pterodactylus/sone/freenet/wot/Identity.java | 26 +--------------------- .../sone/freenet/wot/OwnIdentity.java | 24 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/Identity.java b/src/main/java/net/pterodactylus/sone/freenet/wot/Identity.java index 0e13e9e..b8734c7 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/Identity.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/Identity.java @@ -49,7 +49,7 @@ public class Identity { private volatile boolean contextsLoaded = false; /** The properties of the identity. */ - private final Map properties = Collections.synchronizedMap(new HashMap()); + protected final Map properties = Collections.synchronizedMap(new HashMap()); /** * Creates a new identity. @@ -169,30 +169,6 @@ public class Identity { return properties.get(name); } - /** - * Sets the property with the given name to the given value. - * - * @param name - * The name of the property to set - * @param value - * The new value of the property - */ - public void setProperty(String name, String value) { - properties.put(name, value); - /* TODO - set property. */ - } - - /** - * Removes the property with the given name. - * - * @param name - * The name of the property to remove - */ - public void removeProperty(String name) { - properties.remove(name); - /* TODO - remove property. */ - } - // // OBJECT METHODS // 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 cfcab65..74b5f6a 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/OwnIdentity.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/OwnIdentity.java @@ -84,6 +84,30 @@ public class OwnIdentity extends Identity { } } + /** + * Sets the property with the given name to the given value. + * + * @param name + * The name of the property to set + * @param value + * The new value of the property + */ + public void setProperty(String name, String value) { + properties.put(name, value); + /* TODO - set property. */ + } + + /** + * Removes the property with the given name. + * + * @param name + * The name of the property to remove + */ + public void removeProperty(String name) { + properties.remove(name); + /* TODO - remove property. */ + } + // // OBJECT METHODS // -- 2.7.4