Class CmsNotification

java.lang.Object
org.opencms.gwt.client.ui.CmsNotification

public final class CmsNotification extends Object
User feedback provider.

Since:
8.0.0
  • Field Details

  • Method Details

    • get

      public static CmsNotification get()
      Returns the singleton instance.

      Returns:
      the singleton instance
    • getWidget

      Returns the widget.

      Returns:
      the widget
    • 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
    • removeMessage

      public void removeMessage(CmsNotificationMessage message)
      Removes the given notification message.

      Parameters:
      message - the message to remove
    • send

      public void send(CmsNotification.Type type, 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, String message)
      Sends a new blocking alert notification that can be closed by the user.

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

      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, String message)
      Sends a new notification after all other events have been processed.

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

      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
    • setWidget

      public void setWidget(I_CmsNotificationWidget widget)
      Sets the widget.

      Parameters:
      widget - the widget to set