Remove setIdentity() from Sone.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Sone.java
index 8180a73..7973001 100644 (file)
@@ -29,6 +29,8 @@ import java.util.Set;
 
 import net.pterodactylus.sone.core.Options;
 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;
@@ -176,18 +178,6 @@ public interface Sone extends Identified, Fingerprintable, Comparable<Sone> {
        Identity getIdentity();
 
        /**
-        * Sets the identity of this Sone. The {@link Identity#getId() ID} of the
-        * identity has to match this Sone’s {@link #getId()}.
-        *
-        * @param identity
-        *              The identity of this Sone
-        * @return This Sone (for method chaining)
-        * @throws IllegalArgumentException
-        *              if the ID of the identity does not match this Sone’s ID
-        */
-       Sone setIdentity(Identity identity) throws IllegalArgumentException;
-
-       /**
         * Returns the name of this Sone.
         *
         * @return The name of this Sone
@@ -547,6 +537,10 @@ public interface Sone extends Identified, Fingerprintable, Comparable<Sone> {
        /* TODO - remove this method again, maybe add an option provider */
        void setOptions(Options options);
 
-       AlbumBuilder newAlbumBuilder();
+       AlbumBuilder newAlbumBuilder() throws IllegalStateException;
+
+       PostBuilder newPostBuilder();
+
+       PostReplyBuilder newPostReplyBuilder(String postId) throws IllegalStateException;
 
 }