added the document workflow edit and view notifications
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@68414 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ea88829ee2
commit
806ba670d2
|
@ -244,11 +244,53 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
||||||
aslSession.getUserAvatarId());
|
aslSession.getUserAvatarId());
|
||||||
return getStoreInstance().saveNotification(not);
|
return getStoreInstance().saveNotification(not);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean notifyJobStatus(String userIdToNotify, ApplicationProfile executingJobApId, RunningJob job) {
|
public boolean notifyJobStatus(String userIdToNotify, ApplicationProfile executingJobApId, RunningJob job) {
|
||||||
//TODO: missing implementation
|
//TODO: missing implementation
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean notifyDocumentWorkflowView(String userIdToNotify, String documentWorkflowId, String documentName) {
|
||||||
|
Notification not = new Notification(
|
||||||
|
UUID.randomUUID().toString(),
|
||||||
|
NotificationType.DOCUMENT_WORKFLOW_VIEW,
|
||||||
|
userIdToNotify, //user no notify
|
||||||
|
documentWorkflowId, //the workflowid
|
||||||
|
new Date(),
|
||||||
|
"?oid="+documentWorkflowId,
|
||||||
|
"has viewed the document workflow with name: " + escapeHtml(documentName),
|
||||||
|
false,
|
||||||
|
aslSession.getUsername(),
|
||||||
|
aslSession.getUserFullName(),
|
||||||
|
aslSession.getUserAvatarId());
|
||||||
|
return getStoreInstance().saveNotification(not);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean notifyDocumentWorkflowUpdate(String userIdToNotify, String documentWorkflowId, String documentName) {
|
||||||
|
Notification not = new Notification(
|
||||||
|
UUID.randomUUID().toString(),
|
||||||
|
NotificationType.DOCUMENT_WORKFLOW_EDIT,
|
||||||
|
userIdToNotify, //user no notify
|
||||||
|
documentWorkflowId, //the workflowid
|
||||||
|
new Date(),
|
||||||
|
"?oid="+documentWorkflowId,
|
||||||
|
"has edited the document workflow with name: " + escapeHtml(documentName),
|
||||||
|
false,
|
||||||
|
aslSession.getUsername(),
|
||||||
|
aslSession.getUserFullName(),
|
||||||
|
aslSession.getUserAvatarId());
|
||||||
|
return getStoreInstance().saveNotification(not);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package org.gcube.applicationsupportlayer.social;
|
package org.gcube.applicationsupportlayer.social;
|
||||||
|
|
||||||
import org.gcube.portal.databook.shared.ApplicationProfile;
|
import org.gcube.portal.databook.shared.ApplicationProfile;
|
||||||
import org.gcube.portal.databook.shared.Comment;
|
|
||||||
import org.gcube.portal.databook.shared.Feed;
|
|
||||||
import org.gcube.portal.databook.shared.RunningJob;
|
import org.gcube.portal.databook.shared.RunningJob;
|
||||||
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder;
|
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder;
|
||||||
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem;
|
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem;
|
||||||
|
@ -101,5 +99,42 @@ public interface NotificationsManager {
|
||||||
* @return true if the notification is correctly delivered, false otherwise
|
* @return true if the notification is correctly delivered, false otherwise
|
||||||
*/
|
*/
|
||||||
boolean notifyJobStatus(String userIdToNotify, ApplicationProfile executingJobApId, RunningJob job);
|
boolean notifyJobStatus(String userIdToNotify, ApplicationProfile executingJobApId, RunningJob job);
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
* @param documentName the documentName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
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
|
||||||
|
* @param documentName the documentName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
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,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue