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:
parent
8d03d04133
commit
5be5ac19b7
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue