Added the method: messageItem. Updated to 1.3.0[-SNAPSHOT]
This commit is contained in:
parent
d2970f212d
commit
a75c866ba4
|
@ -4,6 +4,12 @@
|
|||
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.3.0-SNAPSHOT] - 2023-01-25
|
||||
|
||||
**Enhancements**
|
||||
|
||||
- [#23903] Catalogue Moderation: allow to send a message to the moderators
|
||||
|
||||
## [v1.2.0] - 2022-08-01
|
||||
|
||||
**Enhancements**
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
|||
|
||||
<groupId>org.gcube.datacatalogue</groupId>
|
||||
<artifactId>catalogue-util-library</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<name>Ckan utility library</name>
|
||||
<description>
|
||||
Utility library to retrieve users information, organizations information and so on from the ckan d4science datacatalogue
|
||||
|
|
|
@ -162,6 +162,23 @@ public class GCatCaller {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Message item. Send a message to Moderators
|
||||
*
|
||||
* @param datasetName the dataset name
|
||||
* @param moderatorMessage the moderator message
|
||||
* @throws WebApplicationException the web application exception
|
||||
* @throws MalformedURLException the malformed URL exception
|
||||
*/
|
||||
public void messageItem(String datasetName, String moderatorMessage)
|
||||
throws WebApplicationException, MalformedURLException {
|
||||
LOG.trace("messageItem called");
|
||||
LOG.info("Calling mesage item with name: " + datasetName + ", and msg: " + moderatorMessage);
|
||||
|
||||
new Item().message(datasetName, moderatorMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Approve item.
|
||||
*
|
||||
|
@ -239,8 +256,8 @@ public class GCatCaller {
|
|||
LOG.info("called getListItemsForCMStatus called with [status: " + status + "], [limit: " + limit
|
||||
+ "], [offset: " + offset + "], [filters: " + filters + "]");
|
||||
|
||||
Map<String, String> queryParams = GCatCallerUtil.genericQueryBuilderFor(status, limit, offset, false, allFields, filters,
|
||||
sortForField);
|
||||
Map<String, String> queryParams = GCatCallerUtil.genericQueryBuilderFor(status, limit, offset, false, allFields,
|
||||
filters, sortForField);
|
||||
|
||||
return getListItemsForQuery(queryParams);
|
||||
}
|
||||
|
@ -249,7 +266,7 @@ public class GCatCaller {
|
|||
* Count list items for CM status.
|
||||
*
|
||||
* @param status the status
|
||||
* @param filters
|
||||
* @param filters the filters
|
||||
* @return the number of items
|
||||
* @throws WebServiceException the web service exception
|
||||
* @throws MalformedURLException the malformed URL exception
|
||||
|
@ -312,7 +329,7 @@ public class GCatCaller {
|
|||
*
|
||||
* @param reload the reload
|
||||
* @return the configuration
|
||||
* @throws MalformedURLException
|
||||
* @throws MalformedURLException the malformed URL exception
|
||||
*/
|
||||
public GCatCatalogueConfiguration getConfiguration(boolean reload) throws MalformedURLException {
|
||||
LOG.trace("getConfiguration called");
|
||||
|
@ -337,6 +354,13 @@ public class GCatCaller {
|
|||
return catalogueConfiguration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset to page number.
|
||||
*
|
||||
* @param limit the limit
|
||||
* @param offset the offset
|
||||
* @return the int
|
||||
*/
|
||||
private static int offsetToPageNumber(int limit, int offset) {
|
||||
|
||||
int pageNumber = offset;
|
||||
|
|
Loading…
Reference in New Issue