This commit is contained in:
Massimiliano Assante 2016-05-18 22:28:26 +00:00
parent 4248c477c9
commit 5d922b5a8b
1 changed files with 9 additions and 4 deletions

View File

@ -21,6 +21,7 @@ import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.application.framework.core.session.SessionManager;
import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager;
import org.gcube.applicationsupportlayer.social.NotificationsManager;
import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingSite;
import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingUser;
import org.gcube.common.portal.GCubePortalConstants;
import org.gcube.common.portal.PortalContext;
@ -243,7 +244,8 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
//send the notification about this posts to everyone in the group if notifyGroup is true
if (pLevel == PrivacyLevel.SINGLE_VRE && vreOrgId != null && notifyGroup) {
NotificationsManager nm = new ApplicationNotificationsManager(getThreadLocalRequest(),
NotificationsManager nm = new ApplicationNotificationsManager(
new SocialNetworkingSite(getThreadLocalRequest()),
vreScope2Set,
new SocialNetworkingUser(username, email, fullName, thumbnailAvatarURL),
NEWS_FEED_PORTLET_CLASSNAME);
@ -253,7 +255,8 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
}
//send the notification to the mentioned users
if (mentionedUsers != null && mentionedUsers.size() > 0) {
NotificationsManager nm = new ApplicationNotificationsManager(getThreadLocalRequest(),
NotificationsManager nm = new ApplicationNotificationsManager(
new SocialNetworkingSite(getThreadLocalRequest()),
vreScope2Set,
new SocialNetworkingUser(username, email, fullName, thumbnailAvatarURL),
NEWS_FEED_PORTLET_CLASSNAME);
@ -448,7 +451,8 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
//send the notification about this posts to everyone in the group if notifyGroup is true
if (pLevel == PrivacyLevel.SINGLE_VRE && vreOrgId != null && notifyGroup) {
NotificationsManager nm = new ApplicationNotificationsManager(getThreadLocalRequest(),
NotificationsManager nm = new ApplicationNotificationsManager(
new SocialNetworkingSite(getThreadLocalRequest()),
vreScope2Set,
new SocialNetworkingUser(username, email, fullName, thumbnailAvatarURL),
NEWS_FEED_PORTLET_CLASSNAME);
@ -458,7 +462,8 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
}
//send the notification to the mentioned users
if (mentionedUsers != null && mentionedUsers.size() > 0) {
NotificationsManager nm = new ApplicationNotificationsManager(getThreadLocalRequest(),
NotificationsManager nm = new ApplicationNotificationsManager(
new SocialNetworkingSite(getThreadLocalRequest()),
vreScope2Set,
new SocialNetworkingUser(username, email, fullName, thumbnailAvatarURL),
NEWS_FEED_PORTLET_CLASSNAME);