added new notification Types
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@68503 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
65dff0aa7b
commit
be78834fe2
|
@ -336,4 +336,46 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
||||||
return saveNotification(not);
|
return saveNotification(not);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean notifyDocumentWorkflowUserForward(String userIdToNotify, String documentWorkflowId, String documentName, String fromStepName, String toStepName){
|
||||||
|
Notification not = new Notification(
|
||||||
|
UUID.randomUUID().toString(),
|
||||||
|
NotificationType.DOCUMENT_WORKFLOW_USER_FORWARD_TO_OWNER,
|
||||||
|
userIdToNotify, //user no notify
|
||||||
|
documentWorkflowId, //the workflowid
|
||||||
|
new Date(),
|
||||||
|
getApplicationUrl()+"?oid="+documentWorkflowId,
|
||||||
|
"has forwarded a document workflow you created (" + escapeHtml(documentName) + ") " +
|
||||||
|
"from step " + fromStepName + " towards step " + toStepName +". On " + aslSession.getGroupName() + " Virtual Research Environment. ",
|
||||||
|
false,
|
||||||
|
aslSession.getUsername(),
|
||||||
|
aslSession.getUserFullName(),
|
||||||
|
aslSession.getUserAvatarId());
|
||||||
|
|
||||||
|
return saveNotification(not);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean notifyDocumentWorkflowStepForwardComplete(String userIdToNotify, String documentWorkflowId, String documentName, String fromStepName, String toStepName) {
|
||||||
|
Notification not = new Notification(
|
||||||
|
UUID.randomUUID().toString(),
|
||||||
|
NotificationType.DOCUMENT_WORKFLOW_FORWARD_STEP_COMPLETED_OWNER,
|
||||||
|
userIdToNotify, //user no notify
|
||||||
|
documentWorkflowId, //the workflowid
|
||||||
|
new Date(),
|
||||||
|
getApplicationUrl()+"?oid="+documentWorkflowId,
|
||||||
|
"has performed the last needed forward a document workflow you created (" + escapeHtml(documentName) + "). " +
|
||||||
|
"Consequently, this Document Workflow moved from step " + fromStepName + " to step " + toStepName +". On " + aslSession.getGroupName() + " Virtual Research Environment. ",
|
||||||
|
false,
|
||||||
|
aslSession.getUsername(),
|
||||||
|
aslSession.getUserFullName(),
|
||||||
|
aslSession.getUserAvatarId());
|
||||||
|
|
||||||
|
return saveNotification(not);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,22 +126,25 @@ public interface NotificationsManager {
|
||||||
* @return true if the notification is correctly delivered, false otherwise
|
* @return true if the notification is correctly delivered, false otherwise
|
||||||
*/
|
*/
|
||||||
boolean notifyDocumentWorkflowTaskRequest(String userIdToNotify, String documentWorkflowId, String documentName, String assignedRole);
|
boolean notifyDocumentWorkflowTaskRequest(String userIdToNotify, String documentWorkflowId, String documentName, String assignedRole);
|
||||||
//
|
/**
|
||||||
// DOCUMENT_WORKFLOW_VIEW,
|
* 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
|
||||||
// * use to notify a document workflow owner that someone
|
* @param documentWorkflowId
|
||||||
// * has forwarded to another step a document worflow he created
|
* @param documentName
|
||||||
// */
|
* @param fromStepName the name of the step from which the user performed the forward
|
||||||
// DOCUMENT_WORKFLOW_STEP_FORWARD_OWNER,
|
* @param toStepName the name of the step to which the user performed the forward
|
||||||
// /**
|
* @return true if the notification is correctly delivered, false otherwise
|
||||||
// * 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
|
boolean notifyDocumentWorkflowUserForward(String userIdToNotify, String documentWorkflowId, String documentName, String fromStepName, String toStepName);
|
||||||
// */
|
/**
|
||||||
// DOCUMENT_WORKFLOW_STEP_FORWARD_PEER,
|
* 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
|
||||||
// * use to notify a document workflow user (user that in the same document workflow)
|
* @param documentWorkflowId
|
||||||
// * that forwarded to a step where he is requested to do a task
|
* @param documentName
|
||||||
// */
|
* @param fromStepName the name of the step from which the user performed the forward
|
||||||
// DOCUMENT_WORKFLOW_STEP_REQUEST_TASK,
|
* @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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue