Skip to content

Commit

Permalink
fix: checkstyle
Browse files Browse the repository at this point in the history
Signed-off-by: LE SAULNIER Kevin <[email protected]>
  • Loading branch information
LE SAULNIER Kevin committed Apr 15, 2024
1 parent 70d2f37 commit 3d51077
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -50,8 +50,6 @@ public void deleteElements(List<UUID> uuids, String userId) {
deleteElements(uuids);
}



// DOES NOT CHECK OWNER BEFORE DELETING
public void deleteElements(List<UUID> elementUuids) {
var ids = elementUuids.stream().map(UUID::toString).collect(Collectors.joining(","));
Expand All @@ -63,5 +61,4 @@ public void deleteElements(List<UUID> elementUuids) {
HttpHeaders headers = new HttpHeaders();
restTemplate.exchange(directoryServerBaseUri + path, HttpMethod.DELETE, new HttpEntity<>(headers), Void.class);
}

}

0 comments on commit 3d51077

Please sign in to comment.