X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fcore%2FCoreListener.java;h=e2d49466f3fc7c5134a1092e4dd8a0bd4869884e;hb=a2bc5cc3fa7c6d2324b1d9297d77eb79a237fb6e;hp=d5d8cdcf868de6be5cc02a37e18783c2b444161d;hpb=196231f83b4fd9c8c5710b722ff27595f8644734;p=jSite2.git
diff --git a/src/net/pterodactylus/jsite/core/CoreListener.java b/src/net/pterodactylus/jsite/core/CoreListener.java
index d5d8cdc..e2d4946 100644
--- a/src/net/pterodactylus/jsite/core/CoreListener.java
+++ b/src/net/pterodactylus/jsite/core/CoreListener.java
@@ -19,6 +19,8 @@
package net.pterodactylus.jsite.core;
+import net.pterodactylus.jsite.project.Project;
+
/**
* Interface definition for user interfaces.
*
@@ -184,31 +186,58 @@ public interface CoreListener {
public void nodeDisconnected(Node node, Throwable throwable);
//
- // request stuff
+ // project insertion stuff
//
/**
- * Notifies a listener that a request was added to a node.
+ * Notifies a listener that a project insert started.
+ *
+ * @param project
+ * The project that is now inserting
+ */
+ public void projectInsertStarted(Project project);
+
+ /**
+ * Notifies a listener that a project insert made progress.
*
- * @param request
- * The request that was added
+ * @param project
+ * The project that made progress
+ * @param totalBlocks
+ * The number of total blocks
+ * @param requiredBlocks
+ * The number of required blocks
+ * @param successfulBlocks
+ * The number of successfully inserted blocks
+ * @param failedBlocks
+ * The number of blocks that could not be inserted
+ * @param fatallyFailedBlocks
+ * The number of blocks that can not be inserted even with
+ * retries
+ * @param finalizedTotal
+ * true
if the number of total blocks is already
+ * finalized, false
otherwise
*/
- public void requestAdded(Request request);
+ public void projectInsertProgressed(Project project, int totalBlocks, int requiredBlocks, int successfulBlocks, int failedBlocks, int fatallyFailedBlocks, boolean finalizedTotal);
/**
- * Notifies a listener that a request made some progress.
+ * Notifies a listener that a project insert has generated a URI.
*
- * @param request
- * The request that made the progress
+ * @param project
+ * The project that generated a URI
+ * @param uri
+ * The URI that was generated
*/
- public void requestProgressed(Request request);
+ public void projectInsertGeneratedURI(Project project, String uri);
/**
- * Notifies a listener that a request was removed.
+ * Notifies a listener that a project insert has finished.
*
- * @param request
- * The request that was removed
+ * @param project
+ * The project that has finished
+ * @param success
+ * true
if the project was inserted successfully,
+ * false
otherwise
*/
- public void requestRemoved(Request request);
+ public void projectInsertFinished(Project project, boolean success);
}