Package org.opencms.gwt.client.ui
Class CmsNotification
- java.lang.Object
-
- org.opencms.gwt.client.ui.CmsNotification
-
public final class CmsNotification extends java.lang.Object
User feedback provider.- Since:
- 8.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsNotification.Mode
Notification Mode.static class
CmsNotification.Type
Notification Type.
-
Field Summary
Fields Modifier and Type Field Description static int
ANIMATION_DURATION
The duration of the animations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CmsNotification
get()
Returns the singleton instance.I_CmsNotificationWidget
getWidget()
Returns the widget.boolean
hasWidget()
Returns if the notification widget is set.void
removeMessage(CmsNotificationMessage message)
Removes the given notification message.void
send(CmsNotification.Type type, java.lang.String message)
Sends a new notification, that will be removed automatically.void
sendAlert(CmsNotification.Type type, java.lang.String message)
Sends a new blocking alert notification that can be closed by the user.CmsNotificationMessage
sendBusy(CmsNotification.Type type, java.lang.String message)
Sends a new blocking notification that can not be removed by the user.void
sendDeferred(CmsNotification.Type type, java.lang.String message)
Sends a new notification after all other events have been processed.CmsNotificationMessage
sendSticky(CmsNotification.Type type, java.lang.String message)
Sends a new sticky notification that can not be removed by the user.void
setWidget(I_CmsNotificationWidget widget)
Sets the widget.
-
-
-
Field Detail
-
ANIMATION_DURATION
public static final int ANIMATION_DURATION
The duration of the animations.- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static CmsNotification get()
Returns the singleton instance.- Returns:
- the singleton instance
-
getWidget
public I_CmsNotificationWidget 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, java.lang.String message)
Sends a new notification, that will be removed automatically.- Parameters:
type
- the notification typemessage
- 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 typemessage
- 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 typemessage
- 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 typemessage
- 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 typemessage
- 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
-
-