Class NotificationService
java.lang.Object
de.bytestore.hostinger.system.service.NotificationService
-
Constructor Summary
ConstructorsConstructorDescriptionNotificationService(io.jmix.flowui.view.MessageBundle messageBundle) Constructs aNotificationServiceto manage notification-related functionality. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.notification.NotificationcreateProcessPopup(String typeIO, io.jmix.flowui.backgroundtask.BackgroundTask backgroundTask) Creates a popup notification that monitors the progress of a background task.booleanHandles exceptions by displaying an error notification to the user.
-
Constructor Details
-
NotificationService
public NotificationService(io.jmix.flowui.view.MessageBundle messageBundle) Constructs aNotificationServiceto manage notification-related functionality. Initializes the message bundle and configures it with a predefined message group. This service provides capabilities to create process popups for monitoring background tasks and notifying users about their progress, completion, or cancellation.- Parameters:
messageBundle- the message bundle used for localization and formatting of notification messages
-
-
Method Details
-
createProcessPopup
public com.vaadin.flow.component.notification.Notification createProcessPopup(String typeIO, io.jmix.flowui.backgroundtask.BackgroundTask backgroundTask) Creates a popup notification that monitors the progress of a background task. Provides options to cancel the task and displays a success notification upon completion.- Parameters:
typeIO- the type or category of the task to be displayed in the popup notificationbackgroundTask- an instance ofBackgroundTaskto be monitored, including its progress and completion- Returns:
-
handleException
Handles exceptions by displaying an error notification to the user.- Parameters:
ex- the exception that occurred, containing the error details- Returns:
-