Fixed APIs

This commit is contained in:
Luca Frosini 2021-12-03 17:40:41 +01:00
parent 0d5c48ce35
commit e28e49438f
1 changed files with 27 additions and 2 deletions

View File

@ -28,7 +28,6 @@ public class Item extends GCatClient implements org.gcube.gcat.api.interfaces.It
super(enforcedServiceURL, ITEMS); super(enforcedServiceURL, ITEMS);
} }
@Override
public int count() throws WebServiceException { public int count() throws WebServiceException {
Map<String, String> queryParams = new HashMap<>(); Map<String, String> queryParams = new HashMap<>();
queryParams.put(GCatConstants.COUNT_PARAMETER, String.valueOf(true)); queryParams.put(GCatConstants.COUNT_PARAMETER, String.valueOf(true));
@ -58,7 +57,6 @@ public class Item extends GCatClient implements org.gcube.gcat.api.interfaces.It
return this.list(queryParams); return this.list(queryParams);
} }
public String list(Map<String,String> queryParams) throws WebApplicationException { public String list(Map<String,String> queryParams) throws WebApplicationException {
return super.list(queryParams); return super.list(queryParams);
} }
@ -124,6 +122,33 @@ public class Item extends GCatClient implements org.gcube.gcat.api.interfaces.It
super.delete(true, name); super.delete(true, name);
return null; return null;
} }
public Void bulkDelete(Map<String,String> queryParams) throws WebServiceException{
try {
initRequest();
gxhttpStringRequest.queryParams(queryParams);
HttpURLConnection httpURLConnection = gxhttpStringRequest.delete();
parseHttpURLConnection(httpURLConnection);
return null;
}catch (WebApplicationException e) {
throw e;
}catch (Exception e) {
throw new WebApplicationException(e);
}
}
public Void bulkDelete(boolean purge) throws WebServiceException{
return null;
}
public Void bulkPurge() throws WebServiceException {
return null;
}
protected String moderate(String name, ModerationContent moderationContent) { protected String moderate(String name, ModerationContent moderationContent) {
try { try {