also commented notification added

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@73618 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-04-18 14:34:07 +00:00
parent 39e215b72d
commit c4a234bfe4
2 changed files with 33 additions and 2 deletions

View File

@ -337,7 +337,28 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
* {@inheritDoc}
*/
@Override
public boolean notifyCommentReply(String userIdToNotify, String feedid, String feedText) {
public boolean notifyCommentReply(String userIdToNotify, String feedid, String feedText, String feedOwnerFullName) {
Notification not = new Notification(
UUID.randomUUID().toString(),
NotificationType.COMMENT,
userIdToNotify, //user no notify
feedid, //the post
new Date(),
"/group/data-e-infrastructure-gateway?oid="+feedid,
//also commented on Luca Frosini's post
"also commented on on one of your favorite post: " + escapeHtml(feedText),
false,
aslSession.getUsername(),
aslSession.getUserFullName(),
aslSession.getUserAvatarId());
return saveNotification(not);
}
/**
* {@inheritDoc}
*/
@Override
public boolean notifyCommentOnFavorite(String userIdToNotify, String feedid, String feedText) {
Notification not = new Notification(
UUID.randomUUID().toString(),
NotificationType.COMMENT,

View File

@ -111,9 +111,19 @@ public interface NotificationsManager {
* @param userIdToNotify the user you want to notify
* @param feedid the liked feedid
* @param feedText the liked feed text or a portion of it
* @param feedOwnerFullName the full name of the user who created this post
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyCommentReply(String userIdToNotify, String feedid, String feedText);
boolean notifyCommentReply(String userIdToNotify, String feedid, String feedText, String feedOwnerFullName);
/**
* use to notify a user that someone commented on one of his favorite posts
*
* @param userIdToNotify the user you want to notify
* @param feedid the liked feedid
* @param feedText the liked feed text or a portion of it
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyCommentOnFavorite(String userIdToNotify, String feedid, String feedText);
/**
* use to notify a user that he was mentioned (tagged) on a post
*