From 418364b4db9be919ed85830a8d1a67e213cfdd80 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 1 Jun 2009 16:11:14 +0200 Subject: [PATCH] Add listener event when the upload to the node is finished. --- src/de/todesbaum/jsite/application/InsertListener.java | 9 +++++++++ src/de/todesbaum/jsite/gui/ProjectInsertPage.java | 7 +++++++ src/de/todesbaum/jsite/main/CLI.java | 7 +++++++ 3 files changed, 23 insertions(+) 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); } -- 2.7.4