|
|
|
@ -84,6 +84,10 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No
|
|
|
|
|
System.out.println("SessionID = " + sessionID);
|
|
|
|
|
return SessionManager.getInstance().getASLSession(sessionID, user);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* set the user in development mode
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public String getDevelopmentUser() {
|
|
|
|
|
String user = "test.user";
|
|
|
|
|
//user = "massimiliano.assante";
|
|
|
|
@ -125,6 +129,7 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No
|
|
|
|
|
try {
|
|
|
|
|
for (Notification notification : store.getAllNotificationByUser(getASLSession().getUsername(), NotificationConstants.NOTIFICATION_NUMBER_PRE)) {
|
|
|
|
|
Date dateWithoutTime = removeTimePart(notification.getTime());
|
|
|
|
|
notification.setDescription(replaceAmpersand(notification.getDescription()));
|
|
|
|
|
if (! toReturn.containsKey(dateWithoutTime)) {
|
|
|
|
|
ArrayList<Notification> nots = new ArrayList<Notification>();
|
|
|
|
|
nots.add(notification);
|
|
|
|
@ -239,7 +244,11 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No
|
|
|
|
|
}
|
|
|
|
|
return toReturn;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String replaceAmpersand(String toReplace) {
|
|
|
|
|
String toReturn = toReplace.replaceAll("&", "&");
|
|
|
|
|
return toReturn;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean setUserNotificationPreferences(Map<NotificationType, NotificationChannelType[]> enabledChannels) {
|
|
|
|
|
return store.setUserNotificationPreferences(getASLSession().getUsername(), enabledChannels);
|
|
|
|
|