projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert “update found” into EventBus-based event.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
core
/
CoreListenerManager.java
diff --git
a/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java
b/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java
index
f226723
..
bb93fd7
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java
+++ b/
src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java
@@
-1,5
+1,5
@@
/*
/*
- * Sone - CoreListenerManager.java - Copyright © 2010 David Roden
+ * Sone - CoreListenerManager.java - Copyright © 2010
–2012
David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-17,9
+17,7
@@
package net.pterodactylus.sone.core;
package net.pterodactylus.sone.core;
-import net.pterodactylus.sone.data.Post;
-import net.pterodactylus.sone.data.Reply;
-import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.data.Image;
import net.pterodactylus.util.event.AbstractListenerManager;
/**
import net.pterodactylus.util.event.AbstractListenerManager;
/**
@@
-44,54
+42,56
@@
public class CoreListenerManager extends AbstractListenerManager<Core, CoreListe
//
/**
//
/**
- * Notifies all listeners that a
new Sone has been discover
ed.
+ * Notifies all listeners that a
n image has started being insert
ed.
*
*
- * @see CoreListener#
newSoneFound(Son
e)
- * @param
son
e
- * The
discovered sone
+ * @see CoreListener#
imageInsertStarted(Imag
e)
+ * @param
imag
e
+ * The
image that is now inserted
*/
*/
- void fire
NewSoneFound(Sone son
e) {
+ void fire
ImageInsertStarted(Image imag
e) {
for (CoreListener coreListener : getListeners()) {
for (CoreListener coreListener : getListeners()) {
- coreListener.
newSoneFound(son
e);
+ coreListener.
imageInsertStarted(imag
e);
}
}
/**
}
}
/**
- * Notifies all listeners that a
new post has been found
.
+ * Notifies all listeners that a
n image insert was aborted by the user
.
*
*
- * @see CoreListener#
newPostFound(Post
)
- * @param
post
- * The
new post
+ * @see CoreListener#
imageInsertAborted(Image
)
+ * @param
image
+ * The
image that is not inserted anymore
*/
*/
- void fire
NewPostFound(Post post
) {
+ void fire
ImageInsertAborted(Image image
) {
for (CoreListener coreListener : getListeners()) {
for (CoreListener coreListener : getListeners()) {
- coreListener.
newPostFound(post
);
+ coreListener.
imageInsertAborted(image
);
}
}
/**
}
}
/**
- * Notifies all listeners that a
new reply has been foun
d.
+ * Notifies all listeners that a
n image was successfully inserte
d.
*
*
- * @see CoreListener#
newReplyFound(Reply
)
- * @param
reply
- * The
new reply
+ * @see CoreListener#
imageInsertFinished(Image
)
+ * @param
image
+ * The
image that was inserted
*/
*/
- void fire
NewReplyFound(Reply reply
) {
+ void fire
ImageInsertFinished(Image image
) {
for (CoreListener coreListener : getListeners()) {
for (CoreListener coreListener : getListeners()) {
- coreListener.
newReplyFound(reply
);
+ coreListener.
imageInsertFinished(image
);
}
}
/**
}
}
/**
- * Notifies all listeners that
the given Sone is now marked as known
.
+ * Notifies all listeners that
an image failed to be inserted
.
*
*
- * @see CoreListener#markSoneKnown(Sone)
- * @param sone
- * The known Sone
+ * @see CoreListener#imageInsertFailed(Image, Throwable)
+ * @param image
+ * The image that could not be inserted
+ * @param cause
+ * The cause of the failure
*/
*/
- void fire
MarkSoneKnown(Sone son
e) {
+ void fire
ImageInsertFailed(Image image, Throwable caus
e) {
for (CoreListener coreListener : getListeners()) {
for (CoreListener coreListener : getListeners()) {
- coreListener.
markSoneKnown(son
e);
+ coreListener.
imageInsertFailed(image, caus
e);
}
}
}
}