Merge branch 'next' into wot-integration
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 30 Oct 2010 16:40:41 +0000 (18:40 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 30 Oct 2010 16:40:41 +0000 (18:40 +0200)
1  2 
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<Reply> replies = Collections.synchronizedSet(new HashSet<Reply>());
  
 -      /** The IDs of all blocked Sones. */
 -      private final Set<String> blockedSoneIds = Collections.synchronizedSet(new HashSet<String>());
 -
        /** The IDs of all liked posts. */
        private final Set<String> likedPostIds = Collections.synchronizedSet(new HashSet<String>());
  
@@@ -89,7 -91,7 +88,7 @@@
         *            The ID of this Sone
         */
        public Sone(String id) {
-               this.id = UUID.fromString(id);
+               this.id = id;
        }
  
        //
         * @return The ID of this Sone
         */
        public String getId() {
-               return id.toString();
+               return id;
        }
  
        /**
        }
  
        /**
 -       * 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<String> 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