add more events to core listener
[jSite2.git] / src / net / pterodactylus / jsite / core / CoreListener.java
index 5fe47f9..7ded200 100644 (file)
@@ -21,19 +21,48 @@ package net.pterodactylus.jsite.core;
 
 /**
  * Interface definition for user interfaces.
- * 
+ *
  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
  * @version $Id$
  */
 public interface CoreListener {
 
+       //
+       // configuration stuff
+       //
+
        /**
         * Notifies all listeners that loading the projects has failed.
-        * 
+        *
         * @param directory
         *            The directory the projects were tried to load from
+        * @param throwable
+        *            The exception that occured while saving, if any
+        */
+       public void loadingProjectsFailed(String directory, Throwable throwable);
+
+       /**
+        * Notifies a listener that the projects were successfully saved to the
+        * given directory.
+        *
+        * @param directory
+        *            The directory the projects were saved to
         */
-       public void loadingProjectsFailed(String directory);
+       public void savingProjectsDone(String directory);
+
+       /**
+        * Notifies a listener that saving the projects has failed.
+        *
+        * @param directory
+        *            The directory the projects were to be saved to
+        * @param throwable
+        *            The exception that occured when saving the projects, if any
+        */
+       public void savingProjectsFailed(String directory, Throwable throwable);
+
+       //
+       // basic core functionality
+       //
 
        /**
         * Notifies all listeners that the core has loaded.
@@ -41,9 +70,18 @@ public interface CoreListener {
        public void coreLoaded();
 
        /**
+        * Notifies a listener that the core was stopped.
+        */
+       public void coreStopped();
+
+       //
+       // node stuff
+       //
+
+       /**
         * Notifies all listeners that the core started connecting to the given
         * node.
-        * 
+        *
         * @param node
         *            The node that is being connected
         */
@@ -51,7 +89,7 @@ public interface CoreListener {
 
        /**
         * Notifies all listeners that the core connected to the given node.
-        * 
+        *
         * @param node
         *            The node that is connected
         */
@@ -59,7 +97,7 @@ public interface CoreListener {
 
        /**
         * Notifies all listeners that the core disconnected from the given node.
-        * 
+        *
         * @param node
         *            The node that was diconnected
         */