Remove setIdentity() from Sone.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Sone.java
index 41fdcc1..7973001 100644 (file)
@@ -28,9 +28,9 @@ import java.util.List;
 import java.util.Set;
 
 import net.pterodactylus.sone.core.Options;
-import net.pterodactylus.sone.database.AlbumBuilderFactory;
+import net.pterodactylus.sone.database.AlbumBuilder;
 import net.pterodactylus.sone.database.PostBuilder;
-import net.pterodactylus.sone.database.PostBuilderFactory;
+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;
@@ -46,7 +46,7 @@ import com.google.common.primitives.Ints;
  *
  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
-public interface Sone extends Identified, Fingerprintable, PostBuilderFactory, AlbumBuilderFactory, Comparable<Sone> {
+public interface Sone extends Identified, Fingerprintable, Comparable<Sone> {
 
        /**
         * Enumeration for the possible states of a {@link Sone}.
@@ -178,18 +178,6 @@ public interface Sone extends Identified, Fingerprintable, PostBuilderFactory, A
        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
@@ -549,6 +537,10 @@ public interface Sone extends Identified, Fingerprintable, PostBuilderFactory, A
        /* TODO - remove this method again, maybe add an option provider */
        void setOptions(Options options);
 
+       AlbumBuilder newAlbumBuilder() throws IllegalStateException;
+
        PostBuilder newPostBuilder();
 
+       PostReplyBuilder newPostReplyBuilder(String postId) throws IllegalStateException;
+
 }