@Override public String cancelStorageReportSchedule() throws ReportException { String url = buildCancelStorageReportScheduleURL(); try { RestHttpHelper.HttpResponse response = getRestHelper().delete(url); checkResponse(response, HttpStatus.SC_OK); return response.getResponseBody(); } catch (Exception e) { String error = "Could not cancel storage report schedule due to: " + e.getMessage(); throw new ReportException(error, e); } }
@Override public String cancelStorageReport() throws ReportException { String url = buildBaseStorageReportURL(); try { RestHttpHelper.HttpResponse response = getRestHelper().delete(url); checkResponse(response, HttpStatus.SC_OK); return response.getResponseBody(); } catch (Exception e) { String error = "Could not cancel storage report due to: " + e.getMessage(); throw new ReportException(error, e); } }
private void doDeleteSpace(String spaceId) throws ContentStoreException { String task = "delete space"; String url = buildSpaceURL(spaceId); try { HttpResponse response = restHelper.delete(url); checkResponse(response, HttpStatus.SC_OK); } catch (NotFoundException e) { throw new NotFoundException(task, spaceId, e); } catch (UnauthorizedException e) { throw new UnauthorizedException(task, spaceId, e); } catch (Exception e) { throw new ContentStoreException(task, spaceId, e); } }
private void doDeleteContent(String spaceId, String contentId) throws ContentStoreException { String task = "delete content"; String url = buildContentURL(spaceId, contentId); try { HttpResponse response = restHelper.delete(url); checkResponse(response, HttpStatus.SC_OK); } catch (NotFoundException e) { throw new NotFoundException(task, spaceId, contentId, e); } catch (UnauthorizedException e) { throw new UnauthorizedException(task, spaceId, contentId, e); } catch (Exception e) { throw new ContentStoreException(task, spaceId, contentId, e); } }