From 5be5ac19b7dca8fbb7d2267df905cb159751895f Mon Sep 17 00:00:00 2001 From: "massimiliano.assante" Date: Thu, 18 Apr 2013 10:38:03 +0000 Subject: [PATCH] added support for mentions notifications git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/notifications@73600 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../server/NotificationsServiceImpl.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/notifications/server/NotificationsServiceImpl.java b/src/main/java/org/gcube/portlets/user/notifications/server/NotificationsServiceImpl.java index 7ca6d93..89158b1 100644 --- a/src/main/java/org/gcube/portlets/user/notifications/server/NotificationsServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/notifications/server/NotificationsServiceImpl.java @@ -74,8 +74,6 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No } public UserInfo getUserInfo() { - if (getUserFromSession() != null) - return getUserFromSession(); try { String username = getASLSession().getUsername(); String email = username+"@isti.cnr.it"; @@ -90,7 +88,6 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No ThemeDisplay themeDisplay = (ThemeDisplay) this.getThreadLocalRequest().getSession().getAttribute(WebKeys.THEME_DISPLAY); String accountURL = themeDisplay.getURLMyAccount().toString(); UserInfo toReturn = new UserInfo(username, fullName, thumbnailURL, user.getEmailAddress(), accountURL, true, false, null); - setUserInSession(toReturn); return toReturn; } else { @@ -103,13 +100,7 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No } return new UserInfo(); } - private UserInfo getUserFromSession() { - return (UserInfo) getASLSession().getAttribute(UserInfo.USER_INFO_ATTR); - } - - private void setUserInSession(UserInfo user) { - getASLSession().setAttribute(UserInfo.USER_INFO_ATTR, user); - } + /** * returns the notifications separated per days */