diff --git a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java index 703c1ad..cb38c20 100644 --- a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java +++ b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java @@ -290,6 +290,22 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen aslSession.getUserAvatarId()); return getStoreInstance().saveNotification(not); } + @Override + public boolean notifyDocumentWorkflowTaskRequest(String userIdToNotify, String documentWorkflowId, String documentName) { + Notification not = new Notification( + UUID.randomUUID().toString(), + NotificationType.DOCUMENT_WORKFLOW_STEP_REQUEST_TASK, + userIdToNotify, //user no notify + documentWorkflowId, //the workflowid + new Date(), + "?oid="+documentWorkflowId, + "has actively involved you on the document workflow with name: " + escapeHtml(documentName) + " on VRE: " + aslSession.getScopeName(), + false, + aslSession.getUsername(), + aslSession.getUserFullName(), + aslSession.getUserAvatarId()); + return getStoreInstance().saveNotification(not); + } diff --git a/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java b/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java index 4b84335..743209f 100644 --- a/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java +++ b/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java @@ -105,8 +105,7 @@ public interface NotificationsManager { * @param userIdToNotify the user you want to notify * @param documentName the document title * @param documentid the id of the document workflow - * @param documentName the documentName - * @return + * @return true if the notification is correctly delivered, false otherwise */ boolean notifyDocumentWorkflowView(String userIdToNotify, String documentWorkflowId, String documentName); /** @@ -115,26 +114,34 @@ public interface NotificationsManager { * @param userIdToNotify the user you want to notify * @param documentName the document title * @param documentid the id of the document workflow - * @param documentName the documentName - * @return + * @return true if the notification is correctly delivered, false otherwise */ boolean notifyDocumentWorkflowUpdate(String userIdToNotify, String documentWorkflowId, String documentName); -// -// 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, - + /** + * 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); + // + // 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, + }