Add listener event when the upload to the node is finished.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 1 Jun 2009 14:11:14 +0000 (16:11 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 1 Jun 2009 14:11:14 +0000 (16:11 +0200)
src/de/todesbaum/jsite/application/InsertListener.java
src/de/todesbaum/jsite/gui/ProjectInsertPage.java
src/de/todesbaum/jsite/main/CLI.java

index 65b0602..86ba26d 100644 (file)
@@ -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
index 0dd70e6..63eaf49 100644 (file)
@@ -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() {
 
index 1fe69ba..03ddb50 100644 (file)
@@ -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);
        }