use of com.canoo.dp.impl.platform.projector.notifications.NotificationData in project dolphin-platform by canoo.
the class GlobalNotificationsHandler method init.
public CompletableFuture<Void> init() {
CompletableFuture<ControllerProxy<NotificationWrapperBean>> controllerFuture = clientContext.createController(GLOBAL_NOTIFICATIONS_CONTROLLER);
return controllerFuture.handle((c, e) -> {
if (e != null) {
// TODO
}
NotificationWrapperBean model = c.getModel();
model.notificationProperty().onChanged(event -> {
NotificationBean bean = model.getNotification();
if (bean != null) {
showNotification(new NotificationData(bean.getTitle(), bean.getDescription(), bean.getMessageType()));
}
});
NotificationBean bean = model.getNotification();
if (bean != null) {
showNotification(new NotificationData(bean.getTitle(), bean.getDescription(), bean.getMessageType()));
}
return null;
});
}
Aggregations