Add methods to fire soneLocked and soneUnlocked events.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 13 Dec 2010 19:17:01 +0000 (20:17 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 13 Dec 2010 19:17:01 +0000 (20:17 +0100)
src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java

index 7ba226b..464342c 100644 (file)
@@ -171,4 +171,30 @@ public class CoreListenerManager extends AbstractListenerManager<Core, CoreListe
                }
        }
 
+       /**
+        * 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);
+               }
+       }
+
 }