From df2448b0474fcbf8178675140f33f0610c6f5144 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Thu, 5 Dec 2019 11:51:11 +0100 Subject: [PATCH] Added try/catch --- .../catalogue_sharing_widget/ShareCatalogue.gwt.xml | 6 +++--- .../catalogue_sharing_widget/server/ShareServicesImpl.java | 3 ++- .../catalogue_sharing_widget/shared/ItemUrls.java | 2 +- .../catalogue_sharing_widget/ShareCatalogue.gwt.xml | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/ShareCatalogue.gwt.xml b/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/ShareCatalogue.gwt.xml index 839782f..187ac5a 100644 --- a/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/ShareCatalogue.gwt.xml +++ b/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/ShareCatalogue.gwt.xml @@ -12,9 +12,9 @@ - - + diff --git a/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/server/ShareServicesImpl.java b/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/server/ShareServicesImpl.java index f9a579f..54480a4 100644 --- a/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/server/ShareServicesImpl.java +++ b/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/server/ShareServicesImpl.java @@ -33,9 +33,10 @@ public class ShareServicesImpl extends RemoteServiceServlet implements ShareServ @Override public ItemUrls getPackageUrl(String uuid) throws Exception{ - + logger.debug("Called getPackageUrl for uuid: " + uuid); try { String scopePerCurrentUrl = ServerUtils.getScopeFromClientUrl(getThreadLocalRequest()); + logger.debug("The scope per current URL is: " + scopePerCurrentUrl); DataCatalogue catalogue = getCatalogue(scopePerCurrentUrl); CkanDataset dataset = catalogue.getDataset(uuid, catalogue.getApiKeyFromUsername(ServerUtils.getUserInSession(getThreadLocalRequest()))); String longUrl = catalogue.getUnencryptedUrlFromDatasetIdOrName(uuid); diff --git a/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/shared/ItemUrls.java b/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/shared/ItemUrls.java index d67b67a..9d5d8e1 100644 --- a/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/shared/ItemUrls.java +++ b/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/shared/ItemUrls.java @@ -20,7 +20,7 @@ public class ItemUrls implements Serializable { * */ public ItemUrls() { - super(); + } /** diff --git a/src/main/resources/org/gcube/portlets_widgets/catalogue_sharing_widget/ShareCatalogue.gwt.xml b/src/main/resources/org/gcube/portlets_widgets/catalogue_sharing_widget/ShareCatalogue.gwt.xml index 839782f..187ac5a 100644 --- a/src/main/resources/org/gcube/portlets_widgets/catalogue_sharing_widget/ShareCatalogue.gwt.xml +++ b/src/main/resources/org/gcube/portlets_widgets/catalogue_sharing_widget/ShareCatalogue.gwt.xml @@ -12,9 +12,9 @@ - - +