5fb5fed1ac1184e85d8ae46988c214ceb06447e9
[Sone.git] / src / main / java / net / pterodactylus / sone / database / SoneBuilder.java
1 package net.pterodactylus.sone.database;
2
3 import java.util.Collection;
4
5 import net.pterodactylus.sone.data.Client;
6 import net.pterodactylus.sone.data.Post;
7 import net.pterodactylus.sone.data.PostReply;
8 import net.pterodactylus.sone.data.Sone;
9 import net.pterodactylus.sone.freenet.wot.Identity;
10
11 /**
12  * Builder for {@link Sone} objects.
13  *
14  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
15  */
16 public interface SoneBuilder {
17
18         SoneBuilder from(Identity identity);
19         SoneBuilder local();
20
21         SoneBuilder lastUpdated(long lastUpdated);
22         SoneBuilder using(Client client);
23
24         SoneBuilder withPosts(Collection<Post> posts);
25         SoneBuilder withPostReplies(Collection<PostReply> postReplies);
26
27         Sone build() throws IllegalStateException;
28
29 }