Fixed bulkDelete/Purge API

This commit is contained in:
Luca Frosini 2021-12-07 12:30:43 +01:00
parent e28e49438f
commit 1fcea2b14b
1 changed files with 4 additions and 7 deletions

View File

@ -124,9 +124,10 @@ public class Item extends GCatClient implements org.gcube.gcat.api.interfaces.It
}
public Void bulkDelete(Map<String,String> queryParams) throws WebServiceException{
public Void bulkDelete(Map<String,String> queryParams, boolean purge) throws WebServiceException{
try {
initRequest();
queryParams.put(GCatConstants.PURGE_QUERY_PARAMETER, String.valueOf(purge));
gxhttpStringRequest.queryParams(queryParams);
HttpURLConnection httpURLConnection = gxhttpStringRequest.delete();
parseHttpURLConnection(httpURLConnection);
@ -138,18 +139,14 @@ public class Item extends GCatClient implements org.gcube.gcat.api.interfaces.It
}
}
public Void bulkDelete(boolean purge) throws WebServiceException{
return null;
return bulkDelete(null, purge);
}
public Void bulkPurge() throws WebServiceException {
return null;
return bulkDelete(null, true);
}
protected String moderate(String name, ModerationContent moderationContent) {
try {
initRequest();