From: David ‘Bombe’ Roden Date: Sat, 30 Oct 2010 16:40:41 +0000 (+0200) Subject: Merge branch 'next' into wot-integration X-Git-Tag: 0.2-RC1~79 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=9ceea683ab66b047fc4ded3ee6f92b33ceea3968;hp=-c;p=Sone.git Merge branch 'next' into wot-integration --- 9ceea683ab66b047fc4ded3ee6f92b33ceea3968 diff --combined src/main/java/net/pterodactylus/sone/data/Sone.java index fd1deda,5613828..5c0e486 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@@ -24,7 -24,6 +24,6 @@@ import java.util.Comparator import java.util.HashSet; import java.util.List; import java.util.Set; - import java.util.UUID; import java.util.logging.Level; import java.util.logging.Logger; @@@ -45,8 -44,8 +44,8 @@@ public class Sone /** The logger. */ private static final Logger logger = Logging.getLogger(Sone.class); - /** A GUID for this Sone. */ - private final UUID id; + /** The ID of this Sone. */ + private final String id; /** The name of this Sone. */ private volatile String name; @@@ -73,6 -72,9 +72,6 @@@ /** All replies. */ private final Set replies = Collections.synchronizedSet(new HashSet()); - /** The IDs of all blocked Sones. */ - private final Set blockedSoneIds = Collections.synchronizedSet(new HashSet()); - /** The IDs of all liked posts. */ private final Set likedPostIds = Collections.synchronizedSet(new HashSet()); @@@ -89,7 -91,7 +88,7 @@@ * The ID of this Sone */ public Sone(String id) { - this.id = UUID.fromString(id); + this.id = id; } // @@@ -102,7 -104,7 +101,7 @@@ * @return The ID of this Sone */ public String getId() { - return id.toString(); + return id; } /** @@@ -417,6 -419,52 +416,6 @@@ } /** - * Returns the IDs of all blocked Sones. These Sones will not propagated - * using the “known Sones” mechanism. - * - * @return The IDs of all blocked Sones - */ - public Set getBlockedSoneIds() { - return Collections.unmodifiableSet(blockedSoneIds); - } - - /** - * Returns whether the given Sone ID is blocked. - * - * @param soneId - * The Sone ID to check - * @return {@code true} if the given Sone ID is blocked, {@code false} - * otherwise - */ - public boolean isSoneBlocked(String soneId) { - return blockedSoneIds.contains(soneId); - } - - /** - * Adds the given ID to the list of blocked IDs. - * - * @param soneId - * The Sone ID to block - */ - public synchronized void addBlockedSoneId(String soneId) { - if (blockedSoneIds.add(soneId)) { - modificationCounter++; - } - } - - /** - * Removes the given ID from the list of blocked IDs. - * - * @param soneId - * The Sone ID to unblock - */ - public synchronized void removeBlockedSoneId(String soneId) { - if (blockedSoneIds.remove(soneId)) { - modificationCounter++; - } - } - - /** * Returns the IDs of all liked posts. * * @return All liked posts’ IDs