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
This commit is contained in:
Massimiliano Assante 2013-04-18 10:38:03 +00:00
parent 8d03d04133
commit 5be5ac19b7
1 changed files with 1 additions and 10 deletions

View File

@ -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
*/