public class DefaultNotificationService extends Object implements NotificationService
NotificationEvent to publish notifications and
ClearNotificationsEvent to clear them.| Constructor and Description |
|---|
DefaultNotificationService() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearNotifications(String source)
Sends clear event which will remove all notifications from specified source.
|
void |
clearNotifications(String source,
NotificationEvent.Level level)
Sends clear event which will remove all notifications from specified source of specified importance level.
|
String |
getWidgetNotificationSource(ActionContext<?> context)
Gets default source for each notification sent by specified action.
|
String |
getWidgetNotificationSource(WidgetInstanceManager widgetInstanceManager)
Gets default source for each notification sent by specified widget.
|
void |
notifyUser(String source,
String eventType,
NotificationEvent.Level level,
Object... referenceObjects)
Sends a notification to end user.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnotifyUser, notifyUserpublic void notifyUser(String source, String eventType, NotificationEvent.Level level, Object... referenceObjects)
NotificationServicenotifyUser in interface NotificationServicesource - identity of notification source.eventType - type of notification to be sent NotificationEventTypes.level - importance level of notification.referenceObjects - optional array of objects that are related to event.public void clearNotifications(String source)
NotificationServiceclearNotifications in interface NotificationServicesource - identity of notification source.public void clearNotifications(String source, NotificationEvent.Level level)
NotificationServiceclearNotifications in interface NotificationServicesource - identity of notification source.level - importance level of notifications to be removed.public String getWidgetNotificationSource(WidgetInstanceManager widgetInstanceManager)
NotificationServicegetWidgetNotificationSource in interface NotificationServicewidgetInstanceManager - instance manager of a widget which sends notification.public String getWidgetNotificationSource(ActionContext<?> context)
NotificationServicegetWidgetNotificationSource in interface NotificationServicecontext - action context.Copyright © 2018. All rights reserved.