X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdatabase%2FPostBuilder.java;h=775378c87e897dfbcc75f83f921f414cbc5f4d22;hb=b72418365155d4c0dd89215c5aeff27feeae68dd;hp=0114ac555ed30b57e7bb5b5849b3ab3be35f8f51;hpb=2f4dcbcbc66688f159d96ebfb04d8bd5f96e9c28;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/database/PostBuilder.java b/src/main/java/net/pterodactylus/sone/database/PostBuilder.java index 0114ac5..775378c 100644 --- a/src/main/java/net/pterodactylus/sone/database/PostBuilder.java +++ b/src/main/java/net/pterodactylus/sone/database/PostBuilder.java @@ -45,14 +45,6 @@ import com.google.common.base.Optional; public interface PostBuilder { /** - * Configures this builder to use a random ID for the new post. If this - * method is used, {@link #withId(String)} must not be used. - * - * @return This post builder - */ - public PostBuilder randomId(); - - /** * Configures this builder to use the given ID as ID for the new post. If * this method is used, {@link #randomId()} must not be used. * @@ -63,14 +55,6 @@ public interface PostBuilder { public PostBuilder withId(String id); /** - * Configures this builder to use the current time when creating the post. - * If this method is used, {@link #withTime(long)} must not be used. - * - * @return This post builder - */ - public PostBuilder currentTime(); - - /** * Configures the builder to use the given time as time for the new post. If * this method is used, {@link #currentTime()} must not be used. * @@ -121,6 +105,12 @@ public interface PostBuilder { * @throws IllegalStateException * if this builder’s configuration is not valid */ - public Post build() throws IllegalStateException; + public Post build(Optional postCreated) throws IllegalStateException; + + interface PostCreated { + + void postCreated(Post post); + + } }