-
Notifications
You must be signed in to change notification settings - Fork 2
Adding a Notification
Jinyoung Jang edited this page May 16, 2017
·
1 revision
Iterator<String> iterator = notiUsers.keySet().iterator();
while(iterator.hasNext()){
String followerUserId = (String)iterator.next();
Notification noti = new Notification();
INotiSetting notiSetting = new NotiSetting();
INotiSetting findResult = notiSetting.findByUserId(followerUserId);
if(!findResult.next() || findResult.isWriteInstance()){
noti.setNotiId(System.currentTimeMillis()); //TODO: why generated is hard to use
noti.setUserId(followerUserId);
noti.setActorId(session.getUser().getUserId());
noti.setConfirm(false);
noti.setInputDate(Calendar.getInstance().getTime());
noti.setInstId(instance.getInstId());
noti.setActAbstract(actAbstract);
noti.add(instance);
}
}
MetaworksRemoteService.pushTargetScriptFiltered(new AllSessionFilter(notiUsers),
"mw3.getAutowiredObject('" + NotificationBadge.class.getName() + "').refresh",
new Object[]{});