org.gcube.applicationsupportlayer.social
Class AslNotificationManager

java.lang.Object
  extended by org.gcube.applicationsupportlayer.social.AslNotificationManager
All Implemented Interfaces:
NotificationManager

public class AslNotificationManager
extends Object
implements NotificationManager

Version:
0.1 Dec 2012 use to notify users from within your application
Author:
Massimiliano Assante, ISTI-CNR

Constructor Summary
AslNotificationManager(org.gcube.application.framework.core.session.ASLSession session)
           
 
Method Summary
 boolean notifyAddedItem(String userIdToNotify, org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem newItem)
          use to notify a user he got a workspace item new in some of his workspace shared folder
 boolean notifyCommentReply(String userIdToNotify, org.gcube.portal.databook.shared.Comment comment)
          use to notify a user that commented on a feed (Not his) that someone commented too
 boolean notifyFolderAddedUser(String userIdToNotify, org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder sharedFolder, String newAddedUserId)
          use to notify a user that a new user was added in on of his workspace shared folder
 boolean notifyFolderRemovedUser(String userIdToNotify, org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder sharedFolder, String removedUserId)
          use to notify a user that an existing user was removed from one of his workspace shared folder
 boolean notifyFolderSharing(String userIdToNotify, org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder sharedFolder)
          use to notify a user he got a workspace folder shared
 boolean notifyLikedFeed(String userIdToNotify, org.gcube.portal.databook.shared.Feed likedFeed)
          use to notify a user he got one of his feed liked
 boolean notifyMessageReceived(String userIdToNotify, org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage message)
          
 boolean notifyOwnCommentReply(String userIdToNotify, org.gcube.portal.databook.shared.Comment comment)
          
 boolean notifyRemovedItem(String userIdToNotify, org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem removedItem)
          use to notify a user he got a workspace item deleted from one of his workspace shared folder
 boolean notifyUpdatedItem(String userIdToNotify, org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem updatedItem)
          use to notify a user he got a workspace item updated from one of his workspace shared folder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AslNotificationManager

public AslNotificationManager(org.gcube.application.framework.core.session.ASLSession session)
Method Detail

notifyFolderSharing

public boolean notifyFolderSharing(String userIdToNotify,
                                   org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder sharedFolder)
use to notify a user he got a workspace folder shared

Specified by:
notifyFolderSharing in interface NotificationManager
Parameters:
userIdToNotify - the user you want to notify
sharedFolder - the shared WorkspaceFolder
Returns:
true if the notification is correctly delivered, false otherwise

notifyFolderAddedUser

public boolean notifyFolderAddedUser(String userIdToNotify,
                                     org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder sharedFolder,
                                     String newAddedUserId)
use to notify a user that a new user was added in on of his workspace shared folder

Specified by:
notifyFolderAddedUser in interface NotificationManager
Parameters:
userIdToNotify - the user you want to notify
sharedFolder - the shared WorkspaceFolder
newAddedUserId - the new user that was added
Returns:
true if the notification is correctly delivered, false otherwise

notifyFolderRemovedUser

public boolean notifyFolderRemovedUser(String userIdToNotify,
                                       org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder sharedFolder,
                                       String removedUserId)
use to notify a user that an existing user was removed from one of his workspace shared folder

Specified by:
notifyFolderRemovedUser in interface NotificationManager
Parameters:
userIdToNotify - the user you want to notify
sharedFolder - the shared WorkspaceFolder
removedUserId - the new user that was removed
Returns:
true if the notification is correctly delivered, false otherwise

notifyAddedItem

public boolean notifyAddedItem(String userIdToNotify,
                               org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem newItem)
use to notify a user he got a workspace item new in some of his workspace shared folder

Specified by:
notifyAddedItem in interface NotificationManager
Parameters:
userIdToNotify - the user you want to notify
newItem - the new shared WorkspaceItem
Returns:
true if the notification is correctly delivered, false otherwise

notifyRemovedItem

public boolean notifyRemovedItem(String userIdToNotify,
                                 org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem removedItem)
use to notify a user he got a workspace item deleted from one of his workspace shared folder

Specified by:
notifyRemovedItem in interface NotificationManager
Parameters:
userIdToNotify - the user you want to notify
removedItem - the removed WorkspaceItem
Returns:
true if the notification is correctly delivered, false otherwise

notifyUpdatedItem

public boolean notifyUpdatedItem(String userIdToNotify,
                                 org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem updatedItem)
use to notify a user he got a workspace item updated from one of his workspace shared folder

Specified by:
notifyUpdatedItem in interface NotificationManager
Parameters:
userIdToNotify - the user you want to notify
updatedItem - the updated shared WorkspaceItem
Returns:
true if the notification is correctly delivered, false otherwise

notifyMessageReceived

public boolean notifyMessageReceived(String userIdToNotify,
                                     org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage message)

Specified by:
notifyMessageReceived in interface NotificationManager
Parameters:
userIdToNotify - the user you want to notify
message - the WorkspaceMessage sent
Returns:
true if the notification is correctly delivered, false otherwise

notifyOwnCommentReply

public boolean notifyOwnCommentReply(String userIdToNotify,
                                     org.gcube.portal.databook.shared.Comment comment)

Specified by:
notifyOwnCommentReply in interface NotificationManager
Parameters:
userIdToNotify - the user you want to notify
comment - the Comment instance to which someone replied to
Returns:
true if the notification is correctly delivered, false otherwise

notifyCommentReply

public boolean notifyCommentReply(String userIdToNotify,
                                  org.gcube.portal.databook.shared.Comment comment)
use to notify a user that commented on a feed (Not his) that someone commented too

Specified by:
notifyCommentReply in interface NotificationManager
Parameters:
userIdToNotify - the user you want to notify
comment - the Comment instance to which someone replied to
Returns:
true if the notification is correctly delivered, false otherwise

notifyLikedFeed

public boolean notifyLikedFeed(String userIdToNotify,
                               org.gcube.portal.databook.shared.Feed likedFeed)
use to notify a user he got one of his feed liked

Specified by:
notifyLikedFeed in interface NotificationManager
Parameters:
userIdToNotify - the user you want to notify
likedFeed - the Feed instance someone liked
Returns:
true if the notification is correctly delivered, false otherwise


Copyright © 2012. All Rights Reserved.