From: Sunder Tattavarada Date: Tue, 7 Jul 2020 17:16:42 +0000 (+0000) Subject: Merge "added annotations" X-Git-Tag: 3.4.0~45 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=d856cbc5d725836a07776b0f20f06bbbda7b5412;hp=-c;p=portal.git Merge "added annotations" --- d856cbc5d725836a07776b0f20f06bbbda7b5412 diff --combined ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/AppsOSController.java index 66237523,1715864a..a64b0299 --- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/AppsOSController.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/AppsOSController.java @@@ -39,7 -39,12 +39,7 @@@ package org.onap.portalapp.portal.contr import java.util.HashMap; import java.util.Map; -import java.util.Set; import javax.servlet.http.HttpServletRequest; -import javax.validation.ConstraintViolation; -import javax.validation.Validation; -import javax.validation.Validator; -import javax.validation.ValidatorFactory; import org.json.JSONObject; import org.onap.portalapp.portal.domain.EPUser; import org.onap.portalapp.portal.ecomp.model.PortalRestResponse; @@@ -56,6 -61,8 +56,8 @@@ import org.springframework.context.anno import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; + import org.springframework.web.bind.annotation.GetMapping; + import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import lombok.NoArgsConstructor; @@@ -80,7 -87,7 +82,7 @@@ public class AppsOSController extends A * @param contactUs * @return */ - @RequestMapping(value = "/portalApi/saveNewUser", method = RequestMethod.POST, produces = "application/json") + @PostMapping(value = "/portalApi/saveNewUser", produces = "application/json") public PortalRestResponse saveNewUser(HttpServletRequest request, @RequestBody EPUser newUser) { EPUser user = EPUserUtils.getUserSession(request); if (newUser == null) @@@ -107,7 -114,7 +109,7 @@@ return new PortalRestResponse<>(PortalRestStatusEnum.OK, saveNewUser, ""); } - @RequestMapping(value = { "/portalApi/currentUserProfile/{loginId}" }, method = RequestMethod.GET, + @GetMapping(value = { "/portalApi/currentUserProfile/{loginId}" }, produces = "application/json") public String getCurrentUserProfile(HttpServletRequest request, @PathVariable("loginId") String loginId) {