Fix javadoc.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 629c2d5..0275e8a 100644 (file)
@@ -35,6 +35,11 @@ import java.util.logging.Logger;
 import net.pterodactylus.sone.core.Options.DefaultOption;
 import net.pterodactylus.sone.core.Options.Option;
 import net.pterodactylus.sone.core.Options.OptionWatcher;
+import net.pterodactylus.sone.core.event.MarkPostKnownEvent;
+import net.pterodactylus.sone.core.event.MarkPostReplyKnownEvent;
+import net.pterodactylus.sone.core.event.MarkSoneKnownEvent;
+import net.pterodactylus.sone.core.event.NewPostFoundEvent;
+import net.pterodactylus.sone.core.event.NewPostReplyFoundEvent;
 import net.pterodactylus.sone.core.event.NewSoneFoundEvent;
 import net.pterodactylus.sone.data.Album;
 import net.pterodactylus.sone.data.Client;
@@ -1114,7 +1119,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
                                                                knownPosts.add(post.getId());
                                                                post.setKnown(true);
                                                        } else if (!knownPosts.contains(post.getId())) {
-                                                               coreListenerManager.fireNewPostFound(post);
+                                                               eventBus.post(new NewPostFoundEvent(post));
                                                        }
                                                }
                                                posts.put(post.getId(), post);
@@ -1139,7 +1144,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
                                                                knownReplies.add(reply.getId());
                                                                reply.setKnown(true);
                                                        } else if (!knownReplies.contains(reply.getId())) {
-                                                               coreListenerManager.fireNewReplyFound(reply);
+                                                               eventBus.post(new NewPostReplyFoundEvent(reply));
                                                        }
                                                }
                                                replies.put(reply.getId(), reply);
@@ -1230,7 +1235,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
 
        /**
         * Marks the given Sone as known. If the Sone was not {@link Post#isKnown()
-        * known} before, a {@link CoreListener#markSoneKnown(Sone)} event is fired.
+        * known} before, a {@link MarkSoneKnownEvent} is fired.
         *
         * @param sone
         *            The Sone to mark as known
@@ -1241,7 +1246,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
                        synchronized (knownSones) {
                                knownSones.add(sone.getId());
                        }
-                       coreListenerManager.fireMarkSoneKnown(sone);
+                       eventBus.post(new MarkSoneKnownEvent(sone));
                        touchConfiguration();
                }
        }
@@ -1543,7 +1548,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
                synchronized (posts) {
                        posts.put(post.getId(), post);
                }
-               coreListenerManager.fireNewPostFound(post);
+               eventBus.post(new NewPostFoundEvent(post));
                sone.addPost(post);
                touchConfiguration();
                localElementTicker.registerEvent(System.currentTimeMillis() + 10 * 1000, new Runnable() {
@@ -1589,7 +1594,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
        public void markPostKnown(Post post) {
                post.setKnown(true);
                synchronized (knownPosts) {
-                       coreListenerManager.fireMarkPostKnown(post);
+                       eventBus.post(new MarkPostKnownEvent(post));
                        if (knownPosts.add(post.getId())) {
                                touchConfiguration();
                        }
@@ -1682,7 +1687,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
                        replies.put(reply.getId(), reply);
                }
                synchronized (knownReplies) {
-                       coreListenerManager.fireNewReplyFound(reply);
+                       eventBus.post(new NewPostReplyFoundEvent(reply));
                }
                sone.addReply(reply);
                touchConfiguration();
@@ -1732,7 +1737,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
        public void markReplyKnown(PostReply reply) {
                reply.setKnown(true);
                synchronized (knownReplies) {
-                       coreListenerManager.fireMarkReplyKnown(reply);
+                       eventBus.post(new MarkPostReplyKnownEvent(reply));
                        if (knownReplies.add(reply.getId())) {
                                touchConfiguration();
                        }