List of usage examples for org.springframework.web.client RestTemplate delete
@Override public void delete(URI url) throws RestClientException
From source file:at.ac.tuwien.dsg.cloud.utilities.gateway.registry.KongService.java
public void deleteApi(String id) { try {/*from ww w. j a v a 2s. c o m*/ RestTemplate restTemplate = new RestTemplate(); restTemplate.delete(this.kongUris.getKongApiIdUri(id)); } catch (HttpClientErrorException ex) { } }
From source file:features.steps.APISteps.java
@And("^I DELETE \\/espi\\/1_1\\/resource\\/RetailCustomer\\/\\{RetailCustomerID\\}\\/UsagePoint\\/\\{UsagePointID\\}$") public void I_DELETE_espi__resource_RetailCustomer_RetailCustomerID_UsagePoint_UsagePointID() throws Throwable { RestTemplate rest = new RestTemplate(); rest.delete(StepUtils.DATA_CUSTODIAN_BASE_URL + "/espi/1_1/resource/RetailCustomer/" + CucumberSession.getUserHashedId() + "/UsagePoint/" + CucumberSession.getUsagePointHashedId()); }
From source file:io.fabric8.che.starter.client.WorkspaceClient.java
public void deleteWorkspace(String cheServerUrl, String workspaceId) { String url = CheRestEndpoints.DELETE_WORKSPACE.generateUrl(cheServerUrl, workspaceId); RestTemplate template = new RestTemplate(); template.delete(url);/*from w ww.j a va 2s . c o m*/ }
From source file:io.fabric8.che.starter.client.WorkspaceClient.java
public void stopWorkspace(String cheServerUrl, String id) { String url = CheRestEndpoints.STOP_WORKSPACE.generateUrl(cheServerUrl, id); RestTemplate template = new RestTemplate(); template.delete(url);//from www .j ava 2 s .com }
From source file:com.wisemapping.test.rest.RestAccountITCase.java
@Test(dataProviderClass = RestHelper.class, dataProvider = "ContentType-Provider-Function") public void deleteUser(final @NotNull MediaType mediaType) { // Configure media types ... final HttpHeaders requestHeaders = createHeaders(mediaType); final RestTemplate adminTemplate = createTemplate(ADMIN_CREDENTIALS); final RestUser dummyUser = createDummyUser(); createUser(requestHeaders, adminTemplate, dummyUser); // Delete user ... final RestTemplate dummyTemplate = createTemplate(dummyUser.getEmail() + ":fooPassword"); dummyTemplate.delete(BASE_REST_URL + "/account"); // Is the user there ? // Check that the user has been created ... // try { // findUser(requestHeaders, adminTemplate, location); // fail("User could not be deleted !"); // } catch (Exception e) { // }//w w w. j av a 2s . co m }
From source file:io.fabric8.che.starter.client.CheRestClient.java
public void deleteWorkspace(String cheServerURL, String workspaceId) { String url = generateURL(cheServerURL, CheRestEndpoints.DELETE_WORKSPACE, workspaceId); RestTemplate template = new RestTemplate(); template.delete(url); }
From source file:io.fabric8.che.starter.client.CheRestClient.java
public void stopWorkspace(String cheServerURL, String id) { String url = generateURL(cheServerURL, CheRestEndpoints.STOP_WORKSPACE, id); RestTemplate template = new RestTemplate(); template.delete(url); }
From source file:org.n52.tamis.rest.forward.processes.jobs.DeleteRequestForwarder.java
/** * {@inheritDoc} <br/>/*from ww w . j av a2 s.co m*/ * <br/> * Delegates an incoming delete request to the WPS proxy. * * @param parameterValueStore * must contain the URL variable * {@link URL_Constants_TAMIS#SERVICE_ID_VARIABLE_NAME} to * identify the WPS instance and * {@link URL_Constants_TAMIS#PROCESS_ID_VARIABLE_NAME} to * identify the process and * {@link URL_Constants_TAMIS#JOB_ID_VARIABLE_NAME} to identify * the job and * @return */ @Override public <T> ResponseEntity forwardRequestToWpsProxy(HttpServletRequest request, T requestBody, ParameterValueStore parameterValueStore) { initializeRequestSpecificParameters(parameterValueStore); String delete_url_wpsProxy = createTargetURL_WpsProxy(request); RestTemplate deleteTemplate = new RestTemplate(); // TODO does that really work this way? // resultTemplate.delete(delete_url_wpsProxy); deleteTemplate.delete(delete_url_wpsProxy); return new ResponseEntity(HttpStatus.OK); }
From source file:com.ge.predix.test.utils.PolicyHelper.java
public void deletePolicySet(final RestTemplate restTemplate, final String acsUrl, final String testPolicyName) { if (testPolicyName != null) { restTemplate.delete(acsUrl + ACS_POLICY_SET_API_PATH + testPolicyName); }/*from w ww. jav a 2 s .c om*/ }
From source file:com.ge.predix.test.utils.ZoneHelper.java
public HttpStatus deleteZone(final RestTemplate restTemplate, final String zoneName, final boolean registeredWithZac) { try {//from w w w .j a v a2 s .c o m restTemplate.delete(this.acsBaseUrl + ACS_ZONE_API_PATH + zoneName); if (registeredWithZac) { deleteServiceFromZac(zoneName); } return HttpStatus.NO_CONTENT; } catch (HttpClientErrorException httpException) { return httpException.getStatusCode(); } catch (JsonProcessingException e) { return HttpStatus.INTERNAL_SERVER_ERROR; } catch (RestClientException e) { return HttpStatus.INTERNAL_SERVER_ERROR; } }