Store the insert URI in the information used for inserting.
[Sone.git] / src / main / java / net / pterodactylus / sone / database / SoneBuilder.java
index 2aca8b9..ebac97e 100644 (file)
 
 package net.pterodactylus.sone.database;
 
+import net.pterodactylus.sone.data.Client;
 import net.pterodactylus.sone.data.Sone;
 import net.pterodactylus.sone.freenet.wot.Identity;
 
+import com.google.common.base.Optional;
+
 /**
  * Builder for {@link Sone} objects.
  *
@@ -27,9 +30,16 @@ import net.pterodactylus.sone.freenet.wot.Identity;
  */
 public interface SoneBuilder {
 
-       SoneBuilder by(Identity identity);
+       SoneBuilder by(String id);
        SoneBuilder local();
+       SoneBuilder using(Client client);
+
+       Sone build(Optional<SoneCreated> soneCreated) throws IllegalStateException;
+
+       interface SoneCreated {
+
+               void soneCreated(Sone createdSone);
 
-       Sone build() throws IllegalStateException;
+       }
 
 }