4243444546474849505152
protected NotificationImpl createNew(UserID userID, String msg) { NotificationID id = new NotificationID(++counter); NotificationImpl ni = new NotificationImpl(id, userID, msg); List l = (List) userMap.get(userID); if (l == null) {
81828384858687888990919293
if (l != null) { Iterator it = l.iterator(); while(it.hasNext()) { NotificationImpl ni = (NotificationImpl) it.next(); if (ni.getStatus() == 0) { flist.add(ni); } } }
373839404142434445464748495051
* * @param id the id of the notification to be dismissed */ public void dismissNotification(NotificationID id) { NotificationImpl ni = get(id); if (ni == null) { return; } ni.setStatus(Notification.STATUS_INACTIVE); save(ni); }
666768697071727374
* @param message the notification message * @return the id of the new notification */ public NotificationID notify(UserID userID, String message) { NotificationImpl impl = createNew(userID, message); return impl.getNotificationID(); }
4142434445464748495051
80818283848586878889909192