Class CmsNotification


  • public final class CmsNotification
    extends java.lang.Object
    User feedback provider.

    Since:
    8.0.0
    • Method Detail

      • get

        public static CmsNotification get()
        Returns the singleton instance.

        Returns:
        the singleton instance
      • hasWidget

        public boolean hasWidget()
        Returns if the notification widget is set. Only if the widget is set, notifications can be shown.

        Returns:
        true if the notification widget is set
      • send

        public void send​(CmsNotification.Type type,
                         java.lang.String message)
        Sends a new notification, that will be removed automatically.

        Parameters:
        type - the notification type
        message - the message
      • sendAlert

        public void sendAlert​(CmsNotification.Type type,
                              java.lang.String message)
        Sends a new blocking alert notification that can be closed by the user.

        Parameters:
        type - the notification type
        message - the message
      • sendBusy

        public CmsNotificationMessage sendBusy​(CmsNotification.Type type,
                                               java.lang.String message)
        Sends a new blocking notification that can not be removed by the user.

        Parameters:
        type - the notification type
        message - the message
        Returns:
        the message, use to hide the message
      • sendDeferred

        public void sendDeferred​(CmsNotification.Type type,
                                 java.lang.String message)
        Sends a new notification after all other events have been processed.

        Parameters:
        type - the notification type
        message - the message
      • sendSticky

        public CmsNotificationMessage sendSticky​(CmsNotification.Type type,
                                                 java.lang.String message)
        Sends a new sticky notification that can not be removed by the user.

        Parameters:
        type - the notification type
        message - the message
        Returns:
        the message, use to hide the message