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.
*
*/
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;
+ }
}