From bfc9595d218973f47df4f05c8733f74a5c9e7abc Mon Sep 17 00:00:00 2001 From: Merel Steenbergen Date: Sun, 17 Mar 2019 18:23:18 +0100 Subject: [PATCH] Changed DTO files to Dto because of checkstyle --- .../main/java/greenify/client/rest/UserService.java | 10 +++++----- .../common/{ActivityDTO.java => ActivityDto.java} | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) rename src/Common/src/main/java/greenify/common/{ActivityDTO.java => ActivityDto.java} (81%) diff --git a/src/Client/src/main/java/greenify/client/rest/UserService.java b/src/Client/src/main/java/greenify/client/rest/UserService.java index b0b6490..85b5199 100644 --- a/src/Client/src/main/java/greenify/client/rest/UserService.java +++ b/src/Client/src/main/java/greenify/client/rest/UserService.java @@ -31,7 +31,7 @@ public class UserService { * @return a built userDTO with the required information */ @SuppressWarnings("Duplicates") - public UserDTO registerUser(String name, String password) { + public UserDto registerUser(String name, String password) { HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080/registerUser") @@ -52,7 +52,7 @@ public class UserService { * @return a built userDTO with the required information */ @SuppressWarnings("Duplicates") - public UserDTO loginUser(String name, String password) { + public UserDto loginUser(String name, String password) { HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080/loginUser") @@ -73,7 +73,7 @@ public class UserService { * @return a built userDTO with the required information */ @SuppressWarnings("Duplicates") - public UserDTO addVeganMeal(Long id, String name) { + public UserDto addVeganMeal(Long id, String name) { HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080/addVeganMeal") @@ -90,13 +90,13 @@ public class UserService { * @return a UserDTO with the required information */ @SuppressWarnings("Duplicates") - public UserDTO getName(Long id) { + public UserDto getName(Long id) { HttpHeaders headers = new HttpHeaders(); headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080/getUsername") .queryParam("id", id); HttpEntity entity = new HttpEntity<>(headers); System.out.println(builder.build().encode().toUri()); - return this.restTemplate.getForObject(builder.build().encode().toUri(), UserDTO.class); + return this.restTemplate.getForObject(builder.build().encode().toUri(), UserDto.class); } } diff --git a/src/Common/src/main/java/greenify/common/ActivityDTO.java b/src/Common/src/main/java/greenify/common/ActivityDto.java similarity index 81% rename from src/Common/src/main/java/greenify/common/ActivityDTO.java rename to src/Common/src/main/java/greenify/common/ActivityDto.java index a564f1e..7f89776 100644 --- a/src/Common/src/main/java/greenify/common/ActivityDTO.java +++ b/src/Common/src/main/java/greenify/common/ActivityDto.java @@ -1,15 +1,15 @@ package greenify.common; -public class ActivityDTO { +public class ActivityDto { private Long id; private String name; private String description; private int score; - public ActivityDTO() { + public ActivityDto() { } - public ActivityDTO(Long id, String name, String description, int score) { + public ActivityDto(Long id, String name, String description, int score) { this.id = id; this.name = name; this.description = description;