public class NotificationService extends Object
Modifier and Type | Class and Description |
---|---|
static class |
NotificationService.Notification |
static class |
NotificationService.NotificationContainer |
Constructor and Description |
---|
NotificationService() |
Modifier and Type | Method and Description |
---|---|
void |
addNotification(String message,
int type,
String userId,
boolean admin) |
void |
addNotification(String message,
String url,
int type,
String userId,
boolean admin)
add a notification.
|
void |
addNotification(String message,
String url,
int type,
String userId,
String receiver,
boolean admin) |
void |
addSystemNotification(ContentContext ctx,
String message,
int type,
boolean admin) |
void |
clearList() |
static NotificationService |
getInstance(GlobalContext globalContext) |
List<NotificationService.NotificationContainer> |
getNotifications(int maxSize) |
List<NotificationService.NotificationContainer> |
getNotifications(String userId,
boolean admin,
int maxSize,
boolean markRead) |
int |
getUnreadNotificationSize(String userId,
boolean admin,
int maxSize) |
static void |
notifExternalService(ContentContext ctx,
String message,
int type,
String inURL,
String userId,
boolean admin) |
static void |
notifExternalService(ContentContext ctx,
String message,
int type,
String inURL,
String userId,
boolean admin,
Collection<String> targetUsers) |
int |
size() |
public static final NotificationService getInstance(GlobalContext globalContext)
public void clearList()
public List<NotificationService.NotificationContainer> getNotifications(String userId, boolean admin, int maxSize, boolean markRead)
public List<NotificationService.NotificationContainer> getNotifications(int maxSize)
public int size()
public int getUnreadNotificationSize(String userId, boolean admin, int maxSize)
public void addSystemNotification(ContentContext ctx, String message, int type, boolean admin)
public static void notifExternalService(ContentContext ctx, String message, int type, String inURL, String userId, boolean admin)
public static void notifExternalService(ContentContext ctx, String message, int type, String inURL, String userId, boolean admin, Collection<String> targetUsers)
public void addNotification(String message, String url, int type, String userId, boolean admin)
message
- the message of the notificationurl
- a url with more information (can be null)type
- the type of the message (same type than GenericMessage)userId
- a notification can be specific for a user or for everybody
(userId null)Copyright © 2012-2018. All Rights Reserved.