From 4e9e84e87fb251115b4962c90c5715492bc546a8 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Mon, 6 Feb 2023 16:48:32 +0100 Subject: [PATCH] Revert "[#23692] Changed interface 'approveItem' adding the parameter socialPost" This reverts commit 2c641eb3b7848626567b38fee6c58fc3ea804cf4. --- CHANGELOG.md | 6 ------ pom.xml | 2 +- .../datacatalogue/utillibrary/gcat/GCatCaller.java | 12 +++++------- .../server/cms/CatalogueContentModeratorSystem.java | 3 +-- .../utillibrary/server/cms/DataCatalogueCMSImpl.java | 5 ++--- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0108dc3..5c3f65a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,6 @@ 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.1-SNAPSHOT] - 2023-02-06 - -**Enhancements** - -- [#23692] Changed interface 'approveItem' adding the parameter socialPost - ## [v1.2.0] - 2022-08-01 **Enhancements** diff --git a/pom.xml b/pom.xml index ef0e60b..7ef0fe7 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.gcube.datacatalogue catalogue-util-library - 1.2.1-SNAPSHOT + 1.2.0 Ckan utility library Utility library to retrieve users information, organizations information and so on from the ckan d4science datacatalogue diff --git a/src/main/java/org/gcube/datacatalogue/utillibrary/gcat/GCatCaller.java b/src/main/java/org/gcube/datacatalogue/utillibrary/gcat/GCatCaller.java index 2770259..6179bde 100644 --- a/src/main/java/org/gcube/datacatalogue/utillibrary/gcat/GCatCaller.java +++ b/src/main/java/org/gcube/datacatalogue/utillibrary/gcat/GCatCaller.java @@ -167,18 +167,16 @@ public class GCatCaller { * * @param datasetName the dataset name * @param moderatorMessage the moderator message - * @param sendSocialPost the send social post. If 'true` sends the social post * @return the string * @throws WebApplicationException the web application exception * @throws MalformedURLException the malformed URL exception */ - public String approveItem(String datasetName, String moderatorMessage, Boolean sendSocialPost) + public String approveItem(String datasetName, String moderatorMessage) throws WebApplicationException, MalformedURLException { LOG.trace("approveItem called"); - LOG.info("Calling approve item with name: " + datasetName + ", sendSocialPost: " + sendSocialPost - + ", msg: " + moderatorMessage); + LOG.info("Calling approve item with name: " + datasetName + ", and msg: " + moderatorMessage); - return new Item().approve(datasetName, moderatorMessage, sendSocialPost); + return new Item().approve(datasetName, moderatorMessage); } @@ -241,8 +239,8 @@ public class GCatCaller { LOG.info("called getListItemsForCMStatus called with [status: " + status + "], [limit: " + limit + "], [offset: " + offset + "], [filters: " + filters + "]"); - Map queryParams = GCatCallerUtil.genericQueryBuilderFor(status, limit, offset, false, allFields, - filters, sortForField); + Map queryParams = GCatCallerUtil.genericQueryBuilderFor(status, limit, offset, false, allFields, filters, + sortForField); return getListItemsForQuery(queryParams); } diff --git a/src/main/java/org/gcube/datacatalogue/utillibrary/server/cms/CatalogueContentModeratorSystem.java b/src/main/java/org/gcube/datacatalogue/utillibrary/server/cms/CatalogueContentModeratorSystem.java index 12f081a..0af1cd8 100644 --- a/src/main/java/org/gcube/datacatalogue/utillibrary/server/cms/CatalogueContentModeratorSystem.java +++ b/src/main/java/org/gcube/datacatalogue/utillibrary/server/cms/CatalogueContentModeratorSystem.java @@ -82,11 +82,10 @@ public interface CatalogueContentModeratorSystem { * * @param itemName the item name * @param moderatorMessage the moderator message - * @param sendSocialPost the send social post. If 'true` sends the social post * @throws WebApplicationException the web application exception * @throws MalformedURLException the malformed URL exception */ - void approveItem(String itemName, String moderatorMessage, Boolean sendSocialPost) throws WebApplicationException, MalformedURLException; + void approveItem(String itemName, String moderatorMessage) throws WebApplicationException, MalformedURLException; diff --git a/src/main/java/org/gcube/datacatalogue/utillibrary/server/cms/DataCatalogueCMSImpl.java b/src/main/java/org/gcube/datacatalogue/utillibrary/server/cms/DataCatalogueCMSImpl.java index 859ed4d..40aba2a 100644 --- a/src/main/java/org/gcube/datacatalogue/utillibrary/server/cms/DataCatalogueCMSImpl.java +++ b/src/main/java/org/gcube/datacatalogue/utillibrary/server/cms/DataCatalogueCMSImpl.java @@ -65,14 +65,13 @@ public class DataCatalogueCMSImpl implements CatalogueContentModeratorSystem { * * @param datasetName the dataset name * @param moderatorMessage the moderator message - * @param sendSocialPost the send social post. If 'true` sends the social post * @throws WebApplicationException the web application exception * @throws MalformedURLException the malformed URL exception */ @Override - public void approveItem(String datasetName, String moderatorMessage, Boolean sendSocialPost) + public void approveItem(String datasetName, String moderatorMessage) throws WebApplicationException, MalformedURLException { - gCatCaller.approveItem(datasetName, moderatorMessage, sendSocialPost); + gCatCaller.approveItem(datasetName, moderatorMessage); }