2012-12-07 15:06:26 +01:00
|
|
|
package org.gcube.applicationsupportlayer.social;
|
|
|
|
|
2013-01-03 16:28:36 +01:00
|
|
|
import org.gcube.portal.databook.shared.ApplicationProfile;
|
2012-12-07 16:29:09 +01:00
|
|
|
import org.gcube.portal.databook.shared.Comment;
|
|
|
|
import org.gcube.portal.databook.shared.Feed;
|
2013-01-03 16:28:36 +01:00
|
|
|
import org.gcube.portal.databook.shared.RunningJob;
|
2012-12-07 15:06:26 +01:00
|
|
|
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder;
|
|
|
|
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem;
|
2012-12-07 16:29:09 +01:00
|
|
|
import org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage;
|
2012-12-07 15:06:26 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @author Massimiliano Assante, ISTI-CNR
|
|
|
|
* @version 0.1 Dec 2012
|
|
|
|
*
|
|
|
|
*/
|
2013-01-03 16:28:36 +01:00
|
|
|
public interface NotificationsManager {
|
2012-12-07 15:06:26 +01:00
|
|
|
/**
|
|
|
|
* use to notify a user he got a workspace folder shared
|
|
|
|
*
|
|
|
|
* @param userIdToNotify the user you want to notify
|
|
|
|
* @param sharedFolder the shared {@link WorkspaceFolder}
|
2012-12-07 16:29:09 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
2012-12-07 15:06:26 +01:00
|
|
|
*/
|
|
|
|
boolean notifyFolderSharing(String userIdToNotify, WorkspaceFolder sharedFolder);
|
|
|
|
/**
|
|
|
|
* use to notify a user that a new user was added in on of his workspace shared folder
|
|
|
|
*
|
|
|
|
* @param userIdToNotify the user you want to notify
|
|
|
|
* @param sharedFolder the shared {@link WorkspaceFolder}
|
|
|
|
* @param newAddedUserId the new user that was added
|
2012-12-07 16:29:09 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
2012-12-07 15:06:26 +01:00
|
|
|
*/
|
|
|
|
boolean notifyFolderAddedUser(String userIdToNotify, WorkspaceFolder sharedFolder, String newAddedUserId);
|
|
|
|
/**
|
|
|
|
* use to notify a user that an existing user was removed from one of his workspace shared folder
|
|
|
|
*
|
|
|
|
* @param userIdToNotify the user you want to notify
|
|
|
|
* @param sharedFolder the shared {@link WorkspaceFolder}
|
|
|
|
* @param removedUserId the new user that was removed
|
2012-12-07 16:29:09 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
2012-12-07 15:06:26 +01:00
|
|
|
*/
|
|
|
|
boolean notifyFolderRemovedUser(String userIdToNotify, WorkspaceFolder sharedFolder, String removedUserId);
|
|
|
|
/**
|
|
|
|
* use to notify a user he got a workspace item new in some of his workspace shared folder
|
2012-12-07 16:29:09 +01:00
|
|
|
* @param userIdToNotify the user you want to notify
|
2012-12-07 15:06:26 +01:00
|
|
|
* @param newItem the new shared {@link WorkspaceItem}
|
2012-12-07 16:29:09 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
2012-12-07 15:06:26 +01:00
|
|
|
*/
|
|
|
|
boolean notifyAddedItem(String userIdToNotify, WorkspaceItem newItem);
|
|
|
|
/**
|
|
|
|
* use to notify a user he got a workspace item deleted from one of his workspace shared folder
|
2012-12-07 16:29:09 +01:00
|
|
|
* @param userIdToNotify the user you want to notify
|
2012-12-07 15:06:26 +01:00
|
|
|
* @param removedItem the removed {@link WorkspaceItem}
|
2012-12-07 16:29:09 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
2012-12-07 15:06:26 +01:00
|
|
|
*/
|
|
|
|
boolean notifyRemovedItem(String userIdToNotify, WorkspaceItem removedItem);
|
|
|
|
/**
|
|
|
|
* use to notify a user he got a workspace item updated from one of his workspace shared folder
|
2012-12-07 16:29:09 +01:00
|
|
|
* @param userIdToNotify the user you want to notify
|
|
|
|
* @param updatedItem the updated shared {@link WorkspaceItem}
|
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
2012-12-07 15:06:26 +01:00
|
|
|
*/
|
|
|
|
boolean notifyUpdatedItem(String userIdToNotify, WorkspaceItem updatedItem);
|
2012-12-07 16:29:09 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param userIdToNotify the user you want to notify
|
2013-01-09 17:47:22 +01:00
|
|
|
* @param subject the subject of the message sent
|
2012-12-07 16:29:09 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
|
|
*/
|
2013-01-09 17:47:22 +01:00
|
|
|
boolean notifyMessageReceived(String userIdToNotify, String subject);
|
2012-12-07 16:29:09 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param userIdToNotify the user you want to notify
|
|
|
|
* @param comment the {@link Comment} instance to which someone replied to
|
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
|
|
*/
|
|
|
|
boolean notifyOwnCommentReply(String userIdToNotify, Comment comment);
|
|
|
|
/**
|
|
|
|
* use to notify a user that commented on a feed (Not his) that someone commented too
|
|
|
|
*
|
|
|
|
* @param userIdToNotify the user you want to notify
|
|
|
|
* @param comment the {@link Comment} instance to which someone replied to
|
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
|
|
*/
|
|
|
|
boolean notifyCommentReply(String userIdToNotify, Comment comment);
|
|
|
|
/**
|
|
|
|
* use to notify a user he got one of his feed liked
|
|
|
|
*
|
|
|
|
* @param userIdToNotify the user you want to notify
|
|
|
|
* @param likedFeed the {@link Feed} instance someone liked
|
2012-12-07 16:30:09 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
2012-12-07 16:29:09 +01:00
|
|
|
*/
|
|
|
|
boolean notifyLikedFeed(String userIdToNotify, Feed likedFeed);
|
2013-01-03 16:28:36 +01:00
|
|
|
/**
|
|
|
|
* use to notify a user he got one of his feed liked
|
|
|
|
*
|
|
|
|
* @param userIdToNotify the user you want to notify
|
|
|
|
* @param executingApp the {@link ApplicationProfile} of the application from which the job was executed/lauched
|
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
|
|
*/
|
|
|
|
boolean notifyJobStatus(String userIdToNotify, ApplicationProfile executingJobApId, RunningJob job);
|
2012-12-07 15:06:26 +01:00
|
|
|
|
|
|
|
}
|