From 46fb568e69bf0c049a2a0427d28c98466c41c9ef Mon Sep 17 00:00:00 2001 From: "massimiliano.assante" Date: Thu, 11 Jun 2015 12:08:50 +0000 Subject: [PATCH] added support for Tabular Data Manager notifications git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@115313 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 2 +- .../ApplicationNotificationsManager.java | 26 ++++++++++++++++--- .../social/NotificationsManager.java | 22 ++++++++++++++++ 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index f401a35..f7c9b88 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.gcube.applicationsupportlayer aslsocial - 0.13.1-SNAPSHOT + 0.14.0-SNAPSHOT jar Social Portal ASL Extension diff --git a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java index be80da5..4ca97e2 100644 --- a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java +++ b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java @@ -778,7 +778,6 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen return saveNotification(not); } - /** * {@inheritDoc} */ @@ -811,7 +810,28 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen aslSession.getUserAvatarId()); return saveNotification(not); - } + } + /** + * {@inheritDoc} + */ + @Override + public boolean notifyTDMTabularResourceSharing(String userIdToNotify, + String tabularResourceName, String encodedTabularResourceParams, + String vreName) throws Exception { + // TODO Auto-generated method stub + return true; + } + /** + * {@inheritDoc} + */ + @Override + public boolean notifyTDMObjectSharing(String userIdToNotify, + NotificationType type, String tdmObjectName, + String encodedTabularResourceParams, String vreName) + throws Exception { + // TODO Auto-generated method stub + return true; + } /** * read the portal instance name from a property file and returns it @@ -862,6 +882,4 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen _log.debug("Returning SENDER_EMAIL: " + toReturn ); return toReturn; } - - } diff --git a/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java b/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java index 26cb5b7..8ee0c81 100644 --- a/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java +++ b/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java @@ -7,6 +7,7 @@ import org.gcube.common.homelibrary.home.workspace.WorkspaceFolder; import org.gcube.common.homelibrary.home.workspace.WorkspaceItem; import org.gcube.common.homelibrary.home.workspace.WorkspaceSharedFolder; import org.gcube.portal.databook.shared.ApplicationProfile; +import org.gcube.portal.databook.shared.NotificationType; import org.gcube.portal.databook.shared.RunningJob; /** * @@ -284,5 +285,26 @@ public interface NotificationsManager { * @return true if the notification is correctly delivered, false otherwise */ boolean notifyDocumentWorkflowStepForwardComplete(String userIdToNotify, String documentWorkflowId, String documentName, String fromStepName, String toStepName); + /** + * use to notify a user he got a Tabular Data Resource shared + * + * @param userIdToNotify the user you want to notify + * @param tabularResourceName the shared tabular resource name + * @param encodedTabularResourceParams the parameters to be placed in the HTTP GET Request (must be encoded) + * @param vreName the VRE in which the action was performed + * @return true if the notification is correctly delivered, false otherwise + */ + boolean notifyTDMTabularResourceSharing(String userIdToNotify, String tabularResourceName, String encodedTabularResourceParams, String vreName) throws Exception; + /** + * use to notify a user he got a Tabular Data Resource shared + * + * @param userIdToNotify the user you want to notify + * @param type type of the shared tdm object (TDM Rule or TDM Template at the moment) + * @param tdmObjectName the name + * @param encodedTabularResourceParams the parameters to be placed in the HTTP GET Request (must be encoded) + * @param vreName the VRE in which the action was performed + * @return true if the notification is correctly delivered, false otherwise + */ + boolean notifyTDMObjectSharing(String userIdToNotify, NotificationType type, String tdmObjectName, String encodedTabularResourceParams, String vreName) throws Exception; }