Remove remnants of the old Rescue Mode.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 1 Jul 2011 07:13:56 +0000 (09:13 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 1 Jul 2011 07:13:56 +0000 (09:13 +0200)
src/main/java/net/pterodactylus/sone/core/CoreListener.java
src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java
src/main/java/net/pterodactylus/sone/web/WebInterface.java
src/main/resources/templates/notify/rescuingSonesNotification.html [deleted file]
src/main/resources/templates/notify/sonesRescuedNotification.html [deleted file]

index 0e497e8..d5120ac 100644 (file)
@@ -33,22 +33,6 @@ import net.pterodactylus.util.version.Version;
 public interface CoreListener extends EventListener {
 
        /**
-        * Notifies a listener that a Sone is now being rescued.
-        *
-        * @param sone
-        *            The Sone that is rescued
-        */
-       public void rescuingSone(Sone sone);
-
-       /**
-        * Notifies a listener that the Sone was rescued and can now be unlocked.
-        *
-        * @param sone
-        *            The Sone that was rescued
-        */
-       public void rescuedSone(Sone sone);
-
-       /**
         * Notifies a listener that a new Sone has been discovered.
         *
         * @param sone
index 08f9ef0..875a2b6 100644 (file)
@@ -45,32 +45,6 @@ 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)
index 06da982..9c96c3e 100644 (file)
@@ -178,12 +178,6 @@ public class WebInterface implements CoreListener {
        /** The “you have been mentioned” notification. */
        private final ListNotification<Post> mentionNotification;
 
-       /** The “rescuing Sone” notification. */
-       private final ListNotification<Sone> rescuingSonesNotification;
-
-       /** The “Sone rescued” notification. */
-       private final ListNotification<Sone> sonesRescuedNotification;
-
        /** Notifications for sone inserts. */
        private final Map<Sone, TemplateNotification> soneInsertNotifications = new HashMap<Sone, TemplateNotification>();
 
@@ -258,12 +252,6 @@ public class WebInterface implements CoreListener {
                Template mentionNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/mentionNotification.html"));
                mentionNotification = new ListNotification<Post>("mention-notification", "posts", mentionNotificationTemplate, false);
 
-               Template rescuingSonesTemplate = TemplateParser.parse(createReader("/templates/notify/rescuingSonesNotification.html"));
-               rescuingSonesNotification = new ListNotification<Sone>("sones-being-rescued-notification", "sones", rescuingSonesTemplate);
-
-               Template sonesRescuedTemplate = TemplateParser.parse(createReader("/templates/notify/sonesRescuedNotification.html"));
-               sonesRescuedNotification = new ListNotification<Sone>("sones-rescued-notification", "sones", sonesRescuedTemplate);
-
                Template lockedSonesTemplate = TemplateParser.parse(createReader("/templates/notify/lockedSonesNotification.html"));
                lockedSonesNotification = new ListNotification<Sone>("sones-locked-notification", "sones", lockedSonesTemplate);
 
@@ -739,25 +727,6 @@ public class WebInterface implements CoreListener {
         * {@inheritDoc}
         */
        @Override
-       public void rescuingSone(Sone sone) {
-               rescuingSonesNotification.add(sone);
-               notificationManager.addNotification(rescuingSonesNotification);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       @Override
-       public void rescuedSone(Sone sone) {
-               rescuingSonesNotification.remove(sone);
-               sonesRescuedNotification.add(sone);
-               notificationManager.addNotification(sonesRescuedNotification);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       @Override
        public void newSoneFound(Sone sone) {
                newSoneNotification.add(sone);
                if (!hasFirstStartNotification()) {
diff --git a/src/main/resources/templates/notify/rescuingSonesNotification.html b/src/main/resources/templates/notify/rescuingSonesNotification.html
deleted file mode 100644 (file)
index eef06ac..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<div class="text">
-       <%= Notification.SoneIsBeingRescued.Text|l10n|html>
-       <%foreach sones sone>
-               <a href="viewSone.html?sone=<% sone.id|html>" title="<% sone.requestUri|html>"><% sone.niceName|html></a><%notlast>,<%/notlast><%last>.<%/last>
-       <%/foreach>
-</div>
diff --git a/src/main/resources/templates/notify/sonesRescuedNotification.html b/src/main/resources/templates/notify/sonesRescuedNotification.html
deleted file mode 100644 (file)
index 84f015d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<div class="text">
-       <%= Notification.SoneRescued.Text|l10n|html>
-       <%foreach sones sone>
-               <a href="viewSone.html?sone=<% sone.id|html>" title="<% sone.requestUri|html>"><% sone.niceName|html></a><%notlast>,<%/notlast><%last>.<%/last>
-       <%/foreach>
-       <%= Notification.SoneRescued.Text.RememberToUnlock|l10n|html>
-</div>