Refs #13306: gCat MUST enforce extra field "searchable" in published Items

Task-Url: https://support.d4science.org/issues/13306

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/gcat@177052 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2019-02-08 14:31:29 +00:00
parent e1de49f00f
commit d1a7a9c16b
2 changed files with 3 additions and 0 deletions

View File

@ -282,6 +282,7 @@ public abstract class CKAN {
protected String sendGetRequest(String path, Map<String,String> parameters) {
try {
logger.debug("Going to send GET request with parameters {}", parameters);
GXHTTPStringRequest gxhttpStringRequest = getGXHTTPStringRequest(path);
gxhttpStringRequest.queryParams(parameters);
HttpURLConnection httpURLConnection = gxhttpStringRequest.get();
@ -295,6 +296,7 @@ public abstract class CKAN {
protected String sendPostRequest(String path, String body) {
try {
logger.debug("Going to send POST request with body {}", body);
GXHTTPStringRequest gxhttpStringRequest = getGXHTTPStringRequest(path);
HttpURLConnection httpURLConnection = gxhttpStringRequest.post(body);
return getResultAsString(httpURLConnection);

View File

@ -184,6 +184,7 @@ public class CKANPackage extends CKAN {
if(key.compareTo(SEARCHABLE_KEY)==0) {
ObjectNode searchableObjectNode = (ObjectNode) jsonNode;
searchableObjectNode.put(EXTRAS_VALUE_KEY, true);
extrasObjectNode.add(searchableObjectNode);
break;
}
}