added new notification Type fo distinguishing between creation and forward
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@68536 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
8ed27c508e
commit
ccdce6483a
|
@ -318,14 +318,9 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean notifyDocumentWorkflowTaskRequest(String userIdToNotify, String documentWorkflowId, String documentName, String assignedRoleName, boolean isStartStep) {
|
public boolean notifyDocumentWorkflowTaskRequest(String userIdToNotify, String documentWorkflowId, String documentName, String assignedRoleName) {
|
||||||
|
|
||||||
String notificationText = "";
|
String notificationText = "You are requested to perform a new task in the Document Workflow (" + escapeHtml(documentName) + "). " +
|
||||||
if (isStartStep)
|
|
||||||
notificationText = "has involved you in a Document Workflow (" + escapeHtml(documentName) + ") " +
|
|
||||||
"and has assigned you the role: " + assignedRoleName +". On " + aslSession.getGroupName() + " Virtual Research Environment.";
|
|
||||||
else
|
|
||||||
notificationText = "You are requested to perform a new task in the Document Workflow (" + escapeHtml(documentName) + "). " +
|
|
||||||
"Your role is: " + assignedRoleName +". On " + aslSession.getGroupName() + " Virtual Research Environment.";
|
"Your role is: " + assignedRoleName +". On " + aslSession.getGroupName() + " Virtual Research Environment.";
|
||||||
Notification not = new Notification(
|
Notification not = new Notification(
|
||||||
UUID.randomUUID().toString(),
|
UUID.randomUUID().toString(),
|
||||||
|
@ -385,4 +380,26 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
||||||
|
|
||||||
return saveNotification(not);
|
return saveNotification(not);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean notifyDocumentWorkflowFirstStepRequest(String userIdToNotify, String documentWorkflowId, String documentName, String assignedRole) {
|
||||||
|
String notificationText = "has involved you in a Document Workflow (" + escapeHtml(documentName) + ") " +
|
||||||
|
"and has assigned you the role: " + assignedRole +". On " + aslSession.getGroupName() + " Virtual Research Environment.";
|
||||||
|
Notification not = new Notification(
|
||||||
|
UUID.randomUUID().toString(),
|
||||||
|
NotificationType.DOCUMENT_WORKFLOW_STEP_REQUEST_TASK,
|
||||||
|
userIdToNotify, //user no notify
|
||||||
|
documentWorkflowId, //the workflowid
|
||||||
|
new Date(),
|
||||||
|
getApplicationUrl()+"?oid="+documentWorkflowId,
|
||||||
|
notificationText,
|
||||||
|
false,
|
||||||
|
aslSession.getUsername(),
|
||||||
|
aslSession.getUserFullName(),
|
||||||
|
aslSession.getUserAvatarId());
|
||||||
|
|
||||||
|
return saveNotification(not);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,17 @@ public interface NotificationsManager {
|
||||||
* @param isStartStep set to true is the document worflow was just created
|
* @param isStartStep set to true is the document worflow was just created
|
||||||
* @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 isStartStep);
|
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);
|
||||||
/**
|
/**
|
||||||
* use to notify a document workflow owner that a user performed a forward action to another step a document worflow he created
|
* 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 userIdToNotify the owner of this document workflow
|
||||||
|
|
Loading…
Reference in New Issue