Move unliking a post from Sone to Post.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Sone.java
index a8830f8..e340bdf 100644 (file)
@@ -34,13 +34,13 @@ import net.pterodactylus.sone.database.AlbumBuilder;
 import net.pterodactylus.sone.database.PostBuilder;
 import net.pterodactylus.sone.database.PostReplyBuilder;
 import net.pterodactylus.sone.freenet.wot.Identity;
-import net.pterodactylus.sone.freenet.wot.OwnIdentity;
 import net.pterodactylus.sone.template.SoneAccessor;
 
+import freenet.keys.FreenetURI;
+
 import com.google.common.base.Function;
 import com.google.common.base.Predicate;
 import com.google.common.primitives.Ints;
-import freenet.keys.FreenetURI;
 
 /**
  * A Sone defines everything about a user: her profile, her status updates, her
@@ -158,7 +158,7 @@ public interface Sone extends Identified, Fingerprintable, Comparable<Sone> {
 
                @Override
                public boolean apply(Sone sone) {
-                       return (sone == null) ? false : sone.getIdentity() instanceof OwnIdentity;
+                       return (sone == null) ? false : sone.isLocal();
                }
 
        };
@@ -295,7 +295,7 @@ public interface Sone extends Identified, Fingerprintable, Comparable<Sone> {
         *
         * @return The friend Sones of this Sone
         */
-       List<String> getFriends();
+       Collection<String> getFriends();
 
        /**
         * Returns whether this Sone has the given Sone as a friend Sone.
@@ -418,24 +418,6 @@ public interface Sone extends Identified, Fingerprintable, Comparable<Sone> {
        boolean isLikedPostId(String postId);
 
        /**
-        * Adds the given post ID to the list of posts this Sone likes.
-        *
-        * @param postId
-        *              The ID of the post
-        * @return This Sone (for method chaining)
-        */
-       Sone addLikedPostId(String postId);
-
-       /**
-        * Removes the given post ID from the list of posts this Sone likes.
-        *
-        * @param postId
-        *              The ID of the post
-        * @return This Sone (for method chaining)
-        */
-       Sone removeLikedPostId(String postId);
-
-       /**
         * Returns the IDs of all liked replies.
         *
         * @return All liked replies’ IDs