Add callback interface to post build() method.
[Sone.git] / src / main / java / net / pterodactylus / sone / database / PostBuilder.java
index 0114ac5..5564a93 100644 (file)
@@ -121,6 +121,12 @@ public interface PostBuilder {
         * @throws IllegalStateException
         *             if this builder’s configuration is not valid
         */
-       public Post build() throws IllegalStateException;
+       public Post build(Optional<PostCreated> postCreated) throws IllegalStateException;
+
+       interface PostCreated {
+
+               void postCreated(Post post);
+
+       }
 
 }