+ /**
+ * Notifies the web interface that a new Sone version was found.
+ *
+ * @param updateFoundEvent
+ * The event
+ */
+ @Subscribe
+ public void updateFound(UpdateFoundEvent updateFoundEvent) {
+ newVersionNotification.getTemplateContext().set("latestVersion", updateFoundEvent.version());
+ newVersionNotification.getTemplateContext().set("latestEdition", updateFoundEvent.latestEdition());
+ newVersionNotification.getTemplateContext().set("releaseTime", updateFoundEvent.releaseTime());
+ notificationManager.addNotification(newVersionNotification);
+ }
+
+ /**
+ * Notifies the web interface that an image insert was started
+ *
+ * @param imageInsertStartedEvent
+ * The event
+ */
+ @Subscribe
+ public void imageInsertStarted(ImageInsertStartedEvent imageInsertStartedEvent) {
+ insertingImagesNotification.add(imageInsertStartedEvent.image());
+ notificationManager.addNotification(insertingImagesNotification);
+ }
+
+ /**
+ * Notifies the web interface that an {@link Image} insert was aborted.
+ *
+ * @param imageInsertAbortedEvent
+ * The event
+ */
+ @Subscribe
+ public void imageInsertAborted(ImageInsertAbortedEvent imageInsertAbortedEvent) {
+ insertingImagesNotification.remove(imageInsertAbortedEvent.image());
+ }
+
+ //
+ // CORELISTENER METHODS
+ //
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void imageInsertFinished(Image image) {
+ insertingImagesNotification.remove(image);
+ insertedImagesNotification.add(image);
+ notificationManager.addNotification(insertedImagesNotification);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void imageInsertFailed(Image image, Throwable cause) {
+ insertingImagesNotification.remove(image);
+ imageInsertFailedNotification.add(image);
+ notificationManager.addNotification(imageInsertFailedNotification);