package net.pterodactylus.sone.core;
import net.pterodactylus.sone.data.Image;
-import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.util.event.AbstractListenerManager;
-import net.pterodactylus.util.version.Version;
/**
* Manager for {@link CoreListener}s.
//
/**
- * Notifies all listeners that the insert of the given Sone has finished
- * successfully.
- *
- * @see SoneInsertListener#insertFinished(Sone, long)
- * @param sone
- * The Sone that was inserted
- * @param insertDuration
- * The insert duration (in milliseconds)
- */
- void fireSoneInserted(Sone sone, long insertDuration) {
- for (CoreListener coreListener : getListeners()) {
- coreListener.soneInserted(sone, insertDuration);
- }
- }
-
- /**
- * Notifies all listeners that the insert of the given Sone was aborted.
- *
- * @see SoneInsertListener#insertStarted(Sone)
- * @param sone
- * The Sone being inserted
- * @param cause
- * The cause for the abortion (may be {@code null}
- */
- void fireSoneInsertAborted(Sone sone, Throwable cause) {
- for (CoreListener coreListener : getListeners()) {
- coreListener.soneInsertAborted(sone, cause);
- }
- }
-
- /**
- * Notifies all listeners that a new version was found.
- *
- * @see CoreListener#updateFound(Version, long, long)
- * @param version
- * The new version
- * @param releaseTime
- * The release time of the new version
- * @param latestEdition
- * The latest edition of the Sone homepage
- */
- void fireUpdateFound(Version version, long releaseTime, long latestEdition) {
- for (CoreListener coreListener : getListeners()) {
- coreListener.updateFound(version, releaseTime, latestEdition);
- }
- }
-
- /**
* Notifies all listeners that an image has started being inserted.
*
* @see CoreListener#imageInsertStarted(Image)