From: David ‘Bombe’ Roden Date: Mon, 1 Jun 2009 14:11:14 +0000 (+0200) Subject: Add listener event when the upload to the node is finished. X-Git-Tag: 0.7.1~6 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=418364b4db9be919ed85830a8d1a67e213cfdd80;p=jSite.git Add listener event when the upload to the node is finished. --- diff --git a/src/de/todesbaum/jsite/application/InsertListener.java b/src/de/todesbaum/jsite/application/InsertListener.java index 65b0602..86ba26d 100644 --- a/src/de/todesbaum/jsite/application/InsertListener.java +++ b/src/de/todesbaum/jsite/application/InsertListener.java @@ -60,6 +60,15 @@ public interface InsertListener extends EventListener { public void projectInsertStarted(Project project); /** + * Notifies a listener that the upload of a project has finished and the + * inserting will start now. + * + * @param project + * The project that has been uploaded + */ + public void projectUploadFinished(Project project); + + /** * Notifies a listener that a project insert has generated a URI. * * @param project diff --git a/src/de/todesbaum/jsite/gui/ProjectInsertPage.java b/src/de/todesbaum/jsite/gui/ProjectInsertPage.java index 0dd70e6..63eaf49 100644 --- a/src/de/todesbaum/jsite/gui/ProjectInsertPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectInsertPage.java @@ -267,6 +267,13 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl /** * {@inheritDoc} */ + public void projectUploadFinished(Project project) { + startTime = System.currentTimeMillis(); + } + + /** + * {@inheritDoc} + */ public void projectURIGenerated(Project project, final String uri) { SwingUtilities.invokeLater(new Runnable() { diff --git a/src/de/todesbaum/jsite/main/CLI.java b/src/de/todesbaum/jsite/main/CLI.java index 1fe69ba..03ddb50 100644 --- a/src/de/todesbaum/jsite/main/CLI.java +++ b/src/de/todesbaum/jsite/main/CLI.java @@ -228,6 +228,13 @@ public class CLI implements InsertListener { /** * {@inheritDoc} */ + public void projectUploadFinished(Project project) { + outputWriter.println("Project \"" + project.getName() + "\" has ben uploaded, starting insert..."); + } + + /** + * {@inheritDoc} + */ public void projectURIGenerated(Project project, String uri) { outputWriter.println("URI: " + uri); }