import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.Reply;
import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.util.version.Version;
/**
* Listener interface for objects that want to be notified on certain
*/
public void soneUnlocked(Sone sone);
+ /**
+ * Notifies a listener that a new version has been found.
+ *
+ * @param version
+ * The version that was found
+ * @param releaseTime
+ * The release time of the new version
+ */
+ public void updateFound(Version version, long releaseTime);
+
}
import net.pterodactylus.sone.data.Reply;
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 a new version was found.
+ *
+ * @see CoreListener#updateFound(Version, long)
+ * @param version
+ * The new version
+ * @param releaseTime
+ * The release time of the new version
+ */
+ void fireUpdateFound(Version version, long releaseTime) {
+ for (CoreListener coreListener : getListeners()) {
+ coreListener.updateFound(version, releaseTime);
+ }
+ }
+
}
import net.pterodactylus.util.template.TemplateProvider;
import net.pterodactylus.util.template.XmlFilter;
import net.pterodactylus.util.thread.Ticker;
+import net.pterodactylus.util.version.Version;
import freenet.clients.http.SessionManager;
import freenet.clients.http.SessionManager.Session;
import freenet.clients.http.ToadletContainer;
}
/**
+ * {@inheritDoc}
+ */
+ @Override
+ public void updateFound(Version version, long releaseTime) {
+ }
+
+ /**
* Template provider implementation that uses
* {@link WebInterface#createReader(String)} to load templates for
* inclusion.