From e6456e4f8950897c4397c79c8c4db04dfc104e4e Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Wed, 17 Feb 2021 15:00:46 +0100 Subject: [PATCH] [#20735] Migrated to catalogue-util-library --- CHANGELOG.md | 24 +++++++++++++++++++ pom.xml | 22 ++++++++--------- .../ShareCatalogue.gwt.xml | 2 +- .../server/ServerUtils.java | 2 +- .../server/ShareServicesImpl.java | 9 ++++--- .../ShareCatalogue.gwt.xml | 2 +- 6 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4f5bc6e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ + +# Changelog + +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.0-SNAPSHOT] - 2021-02-17 + +[#20735] Bug fixes + + +## [v1.1.0] - 2019-12-05 + +Bug fixes + + +## [v1.0.1] - 2017-05-10 + +Bug fixes + + +## [v1.0.0] - 2017-05-01 + +First release diff --git a/pom.xml b/pom.xml index c1ce233..b9644d3 100644 --- a/pom.xml +++ b/pom.xml @@ -13,27 +13,27 @@ org.gcube.portlets-widgets catalogue-sharing-widget - 1.1.0 + 1.2.0-SNAPSHOT catalogue-sharing-widget - + gCube catalogue sharing widget allows to share catalogue's items urls through social facilities. - - + + scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git https://code-repo.d4science.org/gCubeSystem/${project.artifactId} - + 2.7.0 UTF-8 1.7 - + 1.8 @@ -112,10 +112,10 @@ provided - org.gcube.data-catalogue - ckan-util-library - [2.0.0, 3.0.0-SNAPSHOT) - provided + org.gcube.datacatalogue + catalogue-util-library + [1.0.0-SNAPSHOT, 2.0.0) + compile org.gcube.common @@ -142,7 +142,7 @@ - + src/main/java 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 187ac5a..fd1f9db 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 @@ -8,7 +8,7 @@ - + diff --git a/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/server/ServerUtils.java b/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/server/ServerUtils.java index 6f12da0..d1ea610 100644 --- a/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/server/ServerUtils.java +++ b/src/main/java/org/gcube/portlets_widgets/catalogue_sharing_widget/server/ServerUtils.java @@ -5,7 +5,7 @@ import javax.servlet.http.HttpSession; import org.gcube.common.portal.PortalContext; import org.gcube.common.scope.api.ScopeProvider; -import org.gcube.datacatalogue.ckanutillibrary.server.ApplicationProfileScopePerUrlReader; +import org.gcube.datacatalogue.utillibrary.server.ApplicationProfileScopePerUrlReader; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; 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 54480a4..dca4f9f 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 @@ -1,7 +1,8 @@ package org.gcube.portlets_widgets.catalogue_sharing_widget.server; -import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogue; -import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogueFactory; +import org.gcube.datacatalogue.utillibrary.server.DataCatalogue; +import org.gcube.datacatalogue.utillibrary.server.DataCatalogueFactory; +import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDataset; import org.gcube.portlets.user.urlshortener.UrlShortener; import org.gcube.portlets_widgets.catalogue_sharing_widget.client.ShareServices; import org.gcube.portlets_widgets.catalogue_sharing_widget.shared.ItemUrls; @@ -10,8 +11,6 @@ import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; -import eu.trentorise.opendata.jackan.model.CkanDataset; - public class ShareServicesImpl extends RemoteServiceServlet implements ShareServices{ private static final long serialVersionUID = -2060855544534802987L; @@ -38,7 +37,7 @@ public class ShareServicesImpl extends RemoteServiceServlet implements ShareServ 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()))); + CkanDataset dataset = catalogue.getDataset(uuid, ServerUtils.getUserInSession(getThreadLocalRequest())); String longUrl = catalogue.getUnencryptedUrlFromDatasetIdOrName(uuid); if(longUrl == null || longUrl.isEmpty()) 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 187ac5a..fd1f9db 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 @@ -8,7 +8,7 @@ - +