148 lines
6.7 KiB
Java
148 lines
6.7 KiB
Java
package org.gcube.applicationsupportlayer.social;
|
|
|
|
import org.gcube.portal.databook.shared.ApplicationProfile;
|
|
import org.gcube.portal.databook.shared.RunningJob;
|
|
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder;
|
|
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem;
|
|
/**
|
|
*
|
|
* @author Massimiliano Assante, ISTI-CNR
|
|
*
|
|
*/
|
|
public interface NotificationsManager {
|
|
/**
|
|
* 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}
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
*/
|
|
boolean notifyFolderSharing(String userIdToNotify, WorkspaceFolder sharedFolder) throws Exception;
|
|
/**
|
|
* 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
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
*/
|
|
boolean notifyFolderAddedUser(String userIdToNotify, WorkspaceFolder sharedFolder, String newAddedUserId) throws Exception;
|
|
/**
|
|
* 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
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
*/
|
|
boolean notifyFolderRemovedUser(String userIdToNotify, WorkspaceFolder sharedFolder, String removedUserId) throws Exception;
|
|
/**
|
|
* use to notify a user he got a workspace item new in some of his workspace shared folder
|
|
* @param userIdToNotify the user you want to notify
|
|
* @param newItem the new shared {@link WorkspaceItem}
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
*/
|
|
boolean notifyAddedItem(String userIdToNotify, WorkspaceItem item) throws Exception;
|
|
/**
|
|
* use to notify a user he got a workspace item deleted from one of his workspace shared folder
|
|
* @param userIdToNotify the user you want to notify
|
|
* @param removedItem the removed {@link WorkspaceItem}
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
*/
|
|
boolean notifyRemovedItem(String userIdToNotify, WorkspaceItem item) throws Exception;
|
|
/**
|
|
* use to notify a user he got a workspace item updated from one of his workspace shared folder
|
|
* @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
|
|
*/
|
|
boolean notifyUpdatedItem(String userIdToNotify, WorkspaceItem item) throws Exception;
|
|
/**
|
|
*
|
|
* @param userIdToNotify the user you want to notify
|
|
* @param subject the subject of the message sent
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
*/
|
|
boolean notifyMessageReceived(String userIdToNotify, String subject);
|
|
/**
|
|
* use to notify a user that someone commented on his post
|
|
*
|
|
* @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 notifyOwnCommentReply(String userIdToNotify, String feedid, String feedText);
|
|
/**
|
|
* use to notify a user that commented on a post (Not his) that someone commented too
|
|
*
|
|
* @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 notifyCommentReply(String userIdToNotify, String feedid, String feedText);
|
|
/**
|
|
* use to notify a user he got one of his post liked
|
|
*
|
|
* @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 notifyLikedFeed(String userIdToNotify, String feedid, String feedText);
|
|
/**
|
|
* use to notify a user he got one of his job finished
|
|
*
|
|
* @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);
|
|
/**
|
|
* use to notify a document workflow owner that someone
|
|
* has viewed a document involved in a worflow he created
|
|
* @param userIdToNotify the user you want to notify
|
|
* @param documentName the document title
|
|
* @param documentid the id of the document workflow
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
*/
|
|
boolean notifyDocumentWorkflowView(String userIdToNotify, String documentWorkflowId, String documentName);
|
|
/**
|
|
* use to notify a document workflow owner that someone
|
|
* has updated a document involved in a worflow he created
|
|
* @param userIdToNotify the user you want to notify
|
|
* @param documentName the document title
|
|
* @param documentid the id of the document workflow
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
*/
|
|
boolean notifyDocumentWorkflowUpdate(String userIdToNotify, String documentWorkflowId, String documentName);
|
|
/**
|
|
* use to notify a document workflow user (user that in the same document workflow)
|
|
* that he is requested to do a task
|
|
* @param userIdToNotify the user you want to notify
|
|
* @param documentName the document title
|
|
* @param documentid the id of the document workflow
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
*/
|
|
boolean notifyDocumentWorkflowTaskRequest(String userIdToNotify, String documentWorkflowId, String documentName, String assignedRole);
|
|
//
|
|
// DOCUMENT_WORKFLOW_VIEW,
|
|
// /**
|
|
// * use to notify a document workflow owner that someone
|
|
// * has forwarded to another step a document worflow he created
|
|
// */
|
|
// DOCUMENT_WORKFLOW_STEP_FORWARD_OWNER,
|
|
// /**
|
|
// * use to notify a document workflow peer (user that in the same step has your same role)
|
|
// * that someone has forwarded to another step a document worflow he was involved into
|
|
// */
|
|
// DOCUMENT_WORKFLOW_STEP_FORWARD_PEER,
|
|
// /**
|
|
// * use to notify a document workflow user (user that in the same document workflow)
|
|
// * that forwarded to a step where he is requested to do a task
|
|
// */
|
|
// DOCUMENT_WORKFLOW_STEP_REQUEST_TASK,
|
|
|
|
}
|