From: David ‘Bombe’ Roden Date: Sun, 2 Jan 2011 17:57:12 +0000 (+0100) Subject: Add methods for single-shot trust mechanism. X-Git-Tag: 0.4^2~8^2~30 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=dc00af042b10cb97d7f7e3c286e553f96c44f299;p=Sone.git Add methods for single-shot trust mechanism. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 2349481..7565ca4 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -957,6 +957,42 @@ public class Core implements IdentityListener { } /** + * Assigns the configured positive trust value for the given target. + * + * @param origin + * The trust origin + * @param target + * The trust target + */ + public void trustSone(Sone origin, Sone target) { + setTrust(origin, target, options.getIntegerOption("PositiveTrust").get()); + } + + /** + * Assigns the configured negative trust value for the given target. + * + * @param origin + * The trust origin + * @param target + * The trust target + */ + public void distrustSone(Sone origin, Sone target) { + setTrust(origin, target, options.getIntegerOption("NegativeTrust").get()); + } + + /** + * Removes the trust assignment for the given target. + * + * @param origin + * The trust origin + * @param target + * The trust target + */ + public void untrustSone(Sone origin, Sone target) { + removeTrust(origin, target); + } + + /** * Updates the stores Sone with the given Sone. * * @param sone