diff --git a/src/main/java/org/gridsuite/explore/server/SupervisionController.java b/src/main/java/org/gridsuite/explore/server/SupervisionController.java index 7fcfcdf..09e98e4 100644 --- a/src/main/java/org/gridsuite/explore/server/SupervisionController.java +++ b/src/main/java/org/gridsuite/explore/server/SupervisionController.java @@ -4,8 +4,6 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; -import org.gridsuite.explore.server.services.DirectoryService; -import org.gridsuite.explore.server.services.ExploreService; import org.gridsuite.explore.server.services.SupervisionService; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; diff --git a/src/main/java/org/gridsuite/explore/server/services/SupervisionService.java b/src/main/java/org/gridsuite/explore/server/services/SupervisionService.java index b304c17..6db02b3 100644 --- a/src/main/java/org/gridsuite/explore/server/services/SupervisionService.java +++ b/src/main/java/org/gridsuite/explore/server/services/SupervisionService.java @@ -24,14 +24,14 @@ public class SupervisionService { private static final String SUPERVISION_PATH = "/supervision"; - private static final String ELEMENTS_SERVER_ROOT_PATH = DELIMITER + DIRECTORY_SERVER_API_VERSION + DELIMITER + SUPERVISION_PATH + DELIMITER + private static final String ELEMENTS_SERVER_ROOT_PATH = DELIMITER + DIRECTORY_SERVER_API_VERSION + DELIMITER + SUPERVISION_PATH + DELIMITER + "elements"; private String directoryServerBaseUri; private final RestTemplate restTemplate; - public SupervisionService (DirectoryService directoryService, RestTemplate restTemplate, RemoteServicesProperties remoteServicesProperties) { + public SupervisionService(DirectoryService directoryService, RestTemplate restTemplate, RemoteServicesProperties remoteServicesProperties) { this.directoryServerBaseUri = remoteServicesProperties.getServiceUri("directory-server"); this.directoryService = directoryService; this.restTemplate = restTemplate; @@ -50,8 +50,6 @@ public void deleteElements(List uuids, String userId) { deleteElements(uuids); } - - // DOES NOT CHECK OWNER BEFORE DELETING public void deleteElements(List elementUuids) { var ids = elementUuids.stream().map(UUID::toString).collect(Collectors.joining(",")); @@ -63,5 +61,4 @@ public void deleteElements(List elementUuids) { HttpHeaders headers = new HttpHeaders(); restTemplate.exchange(directoryServerBaseUri + path, HttpMethod.DELETE, new HttpEntity<>(headers), Void.class); } - }