X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FCore.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FCore.java;h=5c1e537756a8f3e4db4aca994709b0885e877444;hp=a8d753ebaa1687f7786ce507bdb1b676382a2b6f;hb=d13f0d94b3c6a5cce03ec92cd7d0f3470ea2fb57;hpb=28be0e47c683650202cc74795d002acd10616642 diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index a8d753e..5c1e537 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -749,75 +749,6 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, } /** - * Sets the trust value of the given origin Sone for the target Sone. - * - * @param origin - * The origin Sone - * @param target - * The target Sone - * @param trustValue - * The trust value (from {@code -100} to {@code 100}) - */ - public void setTrust(Sone origin, Sone target, int trustValue) { - checkNotNull(origin, "origin must not be null"); - checkArgument(origin.getIdentity() instanceof OwnIdentity, "origin must be a local Sone"); - checkNotNull(target, "target must not be null"); - checkArgument((trustValue >= -100) && (trustValue <= 100), "trustValue must be within [-100, 100]"); - webOfTrustUpdater.setTrust((OwnIdentity) origin.getIdentity(), target.getIdentity(), trustValue, preferences.getTrustComment()); - } - - /** - * Removes any trust assignment for the given target Sone. - * - * @param origin - * The trust origin - * @param target - * The trust target - */ - public void removeTrust(Sone origin, Sone target) { - checkNotNull(origin, "origin must not be null"); - checkNotNull(target, "target must not be null"); - checkArgument(origin.getIdentity() instanceof OwnIdentity, "origin must be a local Sone"); - webOfTrustUpdater.setTrust((OwnIdentity) origin.getIdentity(), target.getIdentity(), null, null); - } - - /** - * 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, preferences.getPositiveTrust()); - } - - /** - * 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, preferences.getNegativeTrust()); - } - - /** - * 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 stored Sone with the given Sone. * * @param sone