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;
|
|
|
|
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;
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @author Massimiliano Assante, ISTI-CNR
|
|
|
|
*
|
|
|
|
*/
|
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
|
|
|
*/
|
2013-01-11 12:36:44 +01:00
|
|
|
boolean notifyFolderSharing(String userIdToNotify, WorkspaceFolder sharedFolder) throws Exception;
|
2012-12-07 15:06:26 +01:00
|
|
|
/**
|
|
|
|
* 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
|
|
|
*/
|
2013-01-11 12:36:44 +01:00
|
|
|
boolean notifyFolderAddedUser(String userIdToNotify, WorkspaceFolder sharedFolder, String newAddedUserId) throws Exception;
|
2012-12-07 15:06:26 +01:00
|
|
|
/**
|
|
|
|
* 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}
|
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
|
|
|
*/
|
2013-02-27 17:07:04 +01:00
|
|
|
boolean notifyFolderRemovedUser(String userIdToNotify, WorkspaceFolder sharedFolder) throws Exception;
|
2012-12-07 15:06:26 +01:00
|
|
|
/**
|
|
|
|
* 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}
|
2013-02-27 12:22:00 +01:00
|
|
|
* @param sharedFolder the shared folder {@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
|
|
|
*/
|
2013-02-27 12:22:00 +01:00
|
|
|
boolean notifyAddedItem(String userIdToNotify, WorkspaceItem item, WorkspaceFolder sharedFolder) throws Exception;
|
2012-12-07 15:06:26 +01:00
|
|
|
/**
|
|
|
|
* 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}
|
2013-02-27 12:22:00 +01:00
|
|
|
* @param sharedFolder the shared folder {@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
|
|
|
*/
|
2013-02-27 12:22:00 +01:00
|
|
|
boolean notifyRemovedItem(String userIdToNotify, WorkspaceItem item, WorkspaceFolder sharedFolder) throws Exception;
|
2012-12-07 15:06:26 +01:00
|
|
|
/**
|
|
|
|
* 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}
|
2013-03-16 02:40:56 +01:00
|
|
|
* @param sharedFolder the shared folder {@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
|
|
|
*/
|
2013-03-16 02:40:56 +01:00
|
|
|
boolean notifyUpdatedItem(String userIdToNotify, WorkspaceItem item, WorkspaceFolder sharedFolder) throws Exception;
|
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
|
|
|
/**
|
2013-01-11 12:36:44 +01:00
|
|
|
* use to notify a user that someone commented on his post
|
2012-12-07 16:29:09 +01:00
|
|
|
*
|
|
|
|
* @param userIdToNotify the user you want to notify
|
2013-01-11 12:36:44 +01:00
|
|
|
* @param feedid the liked feedid
|
|
|
|
* @param feedText the liked feed text or a portion of it
|
2012-12-07 16:29:09 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
|
|
*/
|
2013-01-11 12:36:44 +01:00
|
|
|
boolean notifyOwnCommentReply(String userIdToNotify, String feedid, String feedText);
|
2012-12-07 16:29:09 +01:00
|
|
|
/**
|
2013-01-11 12:36:44 +01:00
|
|
|
* use to notify a user that commented on a post (Not his) that someone commented too
|
2012-12-07 16:29:09 +01:00
|
|
|
*
|
|
|
|
* @param userIdToNotify the user you want to notify
|
2013-01-11 12:36:44 +01:00
|
|
|
* @param feedid the liked feedid
|
|
|
|
* @param feedText the liked feed text or a portion of it
|
2012-12-07 16:29:09 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
|
|
*/
|
2013-01-11 12:36:44 +01:00
|
|
|
boolean notifyCommentReply(String userIdToNotify, String feedid, String feedText);
|
2012-12-07 16:29:09 +01:00
|
|
|
/**
|
2013-01-11 12:36:44 +01:00
|
|
|
* use to notify a user he got one of his post liked
|
2012-12-07 16:29:09 +01:00
|
|
|
*
|
|
|
|
* @param userIdToNotify the user you want to notify
|
2013-01-11 12:36:44 +01:00
|
|
|
* @param feedid the liked feedid
|
|
|
|
* @param feedText the liked feed text or a portion of it
|
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
|
|
|
*/
|
2013-01-11 12:36:44 +01:00
|
|
|
boolean notifyLikedFeed(String userIdToNotify, String feedid, String feedText);
|
2013-01-03 16:28:36 +01:00
|
|
|
/**
|
2013-01-11 12:36:44 +01:00
|
|
|
* use to notify a user he got one of his job finished
|
2013-01-03 16:28:36 +01:00
|
|
|
*
|
|
|
|
* @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);
|
2013-01-28 01:12:51 +01:00
|
|
|
/**
|
|
|
|
* 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
|
2013-01-28 18:38:43 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
2013-01-28 01:12:51 +01:00
|
|
|
*/
|
|
|
|
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
|
2013-01-28 18:38:43 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
2013-01-28 01:12:51 +01:00
|
|
|
*/
|
|
|
|
boolean notifyDocumentWorkflowUpdate(String userIdToNotify, String documentWorkflowId, String documentName);
|
2013-01-28 18:38:43 +01:00
|
|
|
/**
|
|
|
|
* 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
|
2013-01-29 18:19:06 +01:00
|
|
|
* @param isStartStep set to true is the document worflow was just created
|
2013-01-28 18:38:43 +01:00
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
|
|
*/
|
2013-01-29 19:25:43 +01:00
|
|
|
boolean notifyDocumentWorkflowTaskRequest(String userIdToNotify, String documentWorkflowId, String documentName, String assignedRole);
|
|
|
|
/**
|
|
|
|
* use to notify a document workflow user that a new Document Workflow was created and he is involved in the first step
|
|
|
|
* and 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
|
|
|
|
* @param isStartStep set to true is the document worflow was just created
|
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
|
|
*/
|
|
|
|
boolean notifyDocumentWorkflowFirstStepRequest(String userIdToNotify, String documentWorkflowId, String documentName, String assignedRole);
|
2013-01-29 16:24:44 +01:00
|
|
|
/**
|
|
|
|
* use to notify a document workflow owner that a user performed a forward action to another step a document worflow he created
|
|
|
|
* @param userIdToNotify the owner of this document workflow
|
|
|
|
* @param documentWorkflowId
|
|
|
|
* @param documentName
|
|
|
|
* @param fromStepName the name of the step from which the user performed the forward
|
|
|
|
* @param toStepName the name of the step to which the user performed the forward
|
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
|
|
*/
|
|
|
|
boolean notifyDocumentWorkflowUserForward(String userIdToNotify, String documentWorkflowId, String documentName, String fromStepName, String toStepName);
|
|
|
|
/**
|
|
|
|
* use to notify a document workflow owner that someone forwarded and the workflow moved to another step a document worflow he created
|
|
|
|
* @param userIdToNotify the owner of this document workflow
|
|
|
|
* @param documentWorkflowId
|
|
|
|
* @param documentName
|
|
|
|
* @param fromStepName the name of the step from which the user performed the forward
|
|
|
|
* @param toStepName the name of the step to which the user performed the forward
|
|
|
|
* @return true if the notification is correctly delivered, false otherwise
|
|
|
|
*/
|
|
|
|
boolean notifyDocumentWorkflowStepForwardComplete(String userIdToNotify, String documentWorkflowId, String documentName, String fromStepName, String toStepName);
|
|
|
|
|
2012-12-07 15:06:26 +01:00
|
|
|
}
|