Add String options.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / CoreListenerManager.java
index 84dc5f0..464342c 100644 (file)
@@ -44,6 +44,32 @@ public class CoreListenerManager extends AbstractListenerManager<Core, CoreListe
        //
 
        /**
+        * Notifies all listeners that the given Sone is now being rescued.
+        *
+        * @see CoreListener#rescuingSone(Sone)
+        * @param sone
+        *            The Sone that is being rescued
+        */
+       void fireRescuingSone(Sone sone) {
+               for (CoreListener coreListener : getListeners()) {
+                       coreListener.rescuingSone(sone);
+               }
+       }
+
+       /**
+        * Notifies all listeners that the given Sone was rescued.
+        *
+        * @see CoreListener#rescuedSone(Sone)
+        * @param sone
+        *            The Sone that was rescued
+        */
+       void fireRescuedSone(Sone sone) {
+               for (CoreListener coreListener : getListeners()) {
+                       coreListener.rescuedSone(sone);
+               }
+       }
+
+       /**
         * Notifies all listeners that a new Sone has been discovered.
         *
         * @see CoreListener#newSoneFound(Sone)
@@ -82,4 +108,93 @@ public class CoreListenerManager extends AbstractListenerManager<Core, CoreListe
                }
        }
 
+       /**
+        * Notifies all listeners that the given Sone is now marked as known.
+        *
+        * @see CoreListener#markSoneKnown(Sone)
+        * @param sone
+        *            The known Sone
+        */
+       void fireMarkSoneKnown(Sone sone) {
+               for (CoreListener coreListener : getListeners()) {
+                       coreListener.markSoneKnown(sone);
+               }
+       }
+
+       /**
+        * Notifies all listeners that the given post is now marked as known.
+        *
+        * @param post
+        *            The known post
+        */
+       void fireMarkPostKnown(Post post) {
+               for (CoreListener coreListener : getListeners()) {
+                       coreListener.markPostKnown(post);
+               }
+       }
+
+       /**
+        * Notifies all listeners that the given reply is now marked as known.
+        *
+        * @param reply
+        *            The known reply
+        */
+       void fireMarkReplyKnown(Reply reply) {
+               for (CoreListener coreListener : getListeners()) {
+                       coreListener.markReplyKnown(reply);
+               }
+       }
+
+       /**
+        * Notifies all listener that the given post was removed.
+        *
+        * @see CoreListener#postRemoved(Post)
+        * @param post
+        *            The removed post
+        */
+       void firePostRemoved(Post post) {
+               for (CoreListener coreListener : getListeners()) {
+                       coreListener.postRemoved(post);
+               }
+       }
+
+       /**
+        * Notifies all listener that the given reply was removed.
+        *
+        * @see CoreListener#replyRemoved(Reply)
+        * @param reply
+        *            The removed reply
+        */
+       void fireReplyRemoved(Reply reply) {
+               for (CoreListener coreListener : getListeners()) {
+                       coreListener.replyRemoved(reply);
+               }
+       }
+
+       /**
+        * Notifies all listeners that the given Sone was locked.
+        *
+        * @see CoreListener#soneLocked(Sone)
+        * @param sone
+        *            The Sone that was locked
+        */
+       void fireSoneLocked(Sone sone) {
+               for (CoreListener coreListener : getListeners()) {
+                       coreListener.soneLocked(sone);
+               }
+       }
+
+       /**
+        * Notifies all listeners that the given Sone was unlocked.
+        *
+        * @see CoreListener#soneUnlocked(Sone)
+        * @param sone
+        *            The Sone that was unlocked
+        */
+       void fireSoneUnlocked(Sone sone) {
+               for (CoreListener coreListener : getListeners()) {
+                       coreListener.soneUnlocked(sone);
+               }
+       }
+
 }