open app related for document workflow edit or uptade
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@68452 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
de27602d90
commit
65dff0aa7b
|
@ -61,6 +61,15 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
||||||
_log.error("While trying to save Notification");
|
_log.error("While trying to save Notification");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* return the url of the application if exists in the profile
|
||||||
|
* @return .
|
||||||
|
*/
|
||||||
|
private String getApplicationUrl() {
|
||||||
|
if (applicationProfile != null && applicationProfile.getUrl() != null)
|
||||||
|
return applicationProfile.getUrl();
|
||||||
|
else return "";
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
* @throws InternalErrorException
|
* @throws InternalErrorException
|
||||||
|
@ -277,8 +286,8 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
||||||
userIdToNotify, //user no notify
|
userIdToNotify, //user no notify
|
||||||
documentWorkflowId, //the workflowid
|
documentWorkflowId, //the workflowid
|
||||||
new Date(),
|
new Date(),
|
||||||
"?oid="+documentWorkflowId,
|
getApplicationUrl()+"?oid="+documentWorkflowId,
|
||||||
"has viewed a document workflow you created (" + escapeHtml(documentName) + ")",
|
"has viewed a document workflow you created (" + escapeHtml(documentName) + ").",
|
||||||
false,
|
false,
|
||||||
aslSession.getUsername(),
|
aslSession.getUsername(),
|
||||||
aslSession.getUserFullName(),
|
aslSession.getUserFullName(),
|
||||||
|
@ -290,14 +299,15 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean notifyDocumentWorkflowUpdate(String userIdToNotify, String documentWorkflowId, String documentName) {
|
public boolean notifyDocumentWorkflowUpdate(String userIdToNotify, String documentWorkflowId, String documentName) {
|
||||||
|
|
||||||
Notification not = new Notification(
|
Notification not = new Notification(
|
||||||
UUID.randomUUID().toString(),
|
UUID.randomUUID().toString(),
|
||||||
NotificationType.DOCUMENT_WORKFLOW_EDIT,
|
NotificationType.DOCUMENT_WORKFLOW_EDIT,
|
||||||
userIdToNotify, //user no notify
|
userIdToNotify, //user no notify
|
||||||
documentWorkflowId, //the workflowid
|
documentWorkflowId, //the workflowid
|
||||||
new Date(),
|
new Date(),
|
||||||
"?oid="+documentWorkflowId,
|
getApplicationUrl()+"?oid="+documentWorkflowId,
|
||||||
"has edited a document workflow you created (" + escapeHtml(documentName) + ")",
|
"has edited a document workflow you created (" + escapeHtml(documentName) + ").",
|
||||||
false,
|
false,
|
||||||
aslSession.getUsername(),
|
aslSession.getUsername(),
|
||||||
aslSession.getUserFullName(),
|
aslSession.getUserFullName(),
|
||||||
|
@ -315,7 +325,7 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
||||||
userIdToNotify, //user no notify
|
userIdToNotify, //user no notify
|
||||||
documentWorkflowId, //the workflowid
|
documentWorkflowId, //the workflowid
|
||||||
new Date(),
|
new Date(),
|
||||||
"?oid="+documentWorkflowId,
|
getApplicationUrl()+"?oid="+documentWorkflowId,
|
||||||
"has involved you in a Document Workflow (" + escapeHtml(documentName) + ") " +
|
"has involved you in a Document Workflow (" + escapeHtml(documentName) + ") " +
|
||||||
"and has assigned you the role: " + assignedRoleName +". On " + aslSession.getGroupName() + " Virtual Research Environment. ",
|
"and has assigned you the role: " + assignedRoleName +". On " + aslSession.getGroupName() + " Virtual Research Environment. ",
|
||||||
false,
|
false,
|
||||||
|
@ -326,8 +336,4 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
||||||
return saveNotification(not);
|
return saveNotification(not);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue