diff options
author | Sunder Tattavarada <statta@research.att.com> | 2020-08-04 17:42:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-08-04 17:42:41 +0000 |
commit | 71281f64d4e77a242093f208381d1908a5982861 (patch) | |
tree | bb29dd8c80bb1b329ee4dd2cc6ad7bbe55d18db9 | |
parent | 4d79935df7115dc063a9191a0186d6f834838c69 (diff) | |
parent | ba9f9eaed9cf11aeab3b6264089d51b8bf313f9b (diff) |
Merge "Added proper annotations"
4 files changed, 22 insertions, 20 deletions
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ManifestController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ManifestController.java index 0fd3cfbb..a6f8e2e1 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ManifestController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ManifestController.java @@ -50,7 +50,7 @@ import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; @@ -110,7 +110,7 @@ public class ManifestController extends RestrictedBaseController { * { "error": "message" } * </pre> */ - @RequestMapping(value = { "/manifest" }, method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = { "/manifest" }, produces = "application/json") @ResponseBody public Map<Object, Object> getManifest() { try { diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/MenuListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/MenuListController.java index bedd9c41..d504f602 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/MenuListController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/MenuListController.java @@ -64,7 +64,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.GetMapping; import com.fasterxml.jackson.databind.ObjectMapper; @@ -89,7 +89,7 @@ public class MenuListController extends RestrictedBaseController { * @param response */ @SuppressWarnings("unchecked") - @RequestMapping(value = { "/get_menu" }, method = RequestMethod.GET) + @GetMapping(value = { "/get_menu" }) public void getMenu(HttpServletRequest request, HttpServletResponse response) { logger.debug(EELFLoggerDelegate.debugLogger, "getMenu begins"); try { @@ -127,7 +127,7 @@ public class MenuListController extends RestrictedBaseController { * @param request * @param response */ - @RequestMapping(value = { "/get_app_name" }, method = RequestMethod.GET) + @GetMapping(value = { "/get_app_name" }) public void getAppName(HttpServletRequest request, HttpServletResponse response) { logger.debug(EELFLoggerDelegate.debugLogger, "getAppName begins"); HttpSession session = request.getSession(true); @@ -189,7 +189,7 @@ public class MenuListController extends RestrictedBaseController { * @param request * @param response */ - @RequestMapping(value = { "/get_userinfo" }, method = RequestMethod.GET) + @GetMapping(value = { "/get_userinfo" }) public void getUserInfo(HttpServletRequest request, HttpServletResponse response) { logger.debug(EELFLoggerDelegate.debugLogger, "getUserInfo begins"); try { @@ -222,7 +222,7 @@ public class MenuListController extends RestrictedBaseController { * @param request * @param response */ - @RequestMapping(value = { "/get_topMenuInfo" }, method = RequestMethod.GET) + @GetMapping(value = { "/get_topMenuInfo" }) public void getTopMenu(HttpServletRequest request, HttpServletResponse response) { boolean isAppCentralized = false; HttpSession session = request.getSession(); @@ -258,7 +258,7 @@ public class MenuListController extends RestrictedBaseController { } - @RequestMapping(value = { "/page_redirect" }, method = RequestMethod.GET) + @GetMapping(value = { "/page_redirect" }) public void pageRedirect(HttpServletRequest request, HttpServletResponse response) { String pageToURL = null; try { diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/PostSearchController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/PostSearchController.java index a8c3a5d6..eda1093a 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/PostSearchController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/PostSearchController.java @@ -65,7 +65,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.servlet.ModelAndView; import com.fasterxml.jackson.databind.DeserializationFeature; @@ -93,7 +94,7 @@ public class PostSearchController extends RestrictedBaseController { @Autowired private ProfileService profileService; - @RequestMapping(value = { "/post_search" }, method = RequestMethod.GET) + @GetMapping(value = { "/post_search" }) public ModelAndView welcome(@ModelAttribute(POST_SEARCH_BEAN) PostSearchBean postSearchBean) { Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -110,7 +111,7 @@ public class PostSearchController extends RestrictedBaseController { return new ModelAndView(getViewName(), model); } - @RequestMapping(value = { "/post_search_sample" }, method = RequestMethod.GET) + @GetMapping(value = { "/post_search_sample" }) public void getPostSearchProfile(HttpServletResponse response, @ModelAttribute(POST_SEARCH_BEAN) PostSearchBean postSearchBean) { Map<String, Object> model = new HashMap<>(); @@ -149,7 +150,7 @@ public class PostSearchController extends RestrictedBaseController { return existingUsers; } - @RequestMapping(value = { "/post_search/search" }, method = RequestMethod.POST) + @PostMapping(value = { "/post_search/search" }) public ModelAndView search(HttpServletRequest request, HttpServletResponse response) { try { ObjectMapper mapper = new ObjectMapper(); @@ -198,7 +199,7 @@ public class PostSearchController extends RestrictedBaseController { searchCriteria.getNewDataSize(), UserUtils.getUserSession(request).getId().intValue()); } - @RequestMapping(value = { "/post_search/process" }, method = RequestMethod.POST) + @PostMapping(value = { "/post_search/process" }) public ModelAndView process(HttpServletRequest request, HttpServletResponse response) throws Exception { ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileController.java index 97c156b5..978b246f 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileController.java @@ -6,7 +6,7 @@ * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -64,7 +64,8 @@ import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.servlet.ModelAndView; import com.fasterxml.jackson.databind.DeserializationFeature; @@ -98,7 +99,7 @@ public class ProfileController extends RestrictedBaseController { private RoleService roleService; - @RequestMapping(value = { "/get_self_profile" }, method = RequestMethod.GET) + @GetMapping(value = { "/get_self_profile" }) public void getSelfProfile(HttpServletRequest request, HttpServletResponse response) { Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -126,7 +127,7 @@ public class ProfileController extends RestrictedBaseController { } - @RequestMapping(value = { "/get_profile" }, method = RequestMethod.GET) + @GetMapping(value = { "/get_profile" }) public void getUser(HttpServletRequest request, HttpServletResponse response) { Map<String, Object> model = new HashMap<>(); User user = UserUtils.getUserSession(request); @@ -160,7 +161,7 @@ public class ProfileController extends RestrictedBaseController { } } - @RequestMapping(value = { "/profile/saveProfile" }, method = RequestMethod.POST) + @PostMapping(value = { "/profile/saveProfile" }) public ModelAndView saveProfile(HttpServletRequest request, HttpServletResponse response) { logger.info(EELFLoggerDelegate.debugLogger, PROFILE_CONTAINER); try { @@ -210,7 +211,7 @@ public class ProfileController extends RestrictedBaseController { } } - @RequestMapping(value = { "/profile/removeRole" }, method = RequestMethod.POST) + @PostMapping(value = { "/profile/removeRole" }) public ModelAndView removeRole(HttpServletRequest request, HttpServletResponse response) throws IOException { logger.info(EELFLoggerDelegate.debugLogger, PROFILE_CONTAINER); @@ -257,7 +258,7 @@ public class ProfileController extends RestrictedBaseController { } } - @RequestMapping(value = { "/profile/addNewRole" }, method = RequestMethod.POST) + @PostMapping(value = { "/profile/addNewRole" }) public ModelAndView addNewRole(HttpServletRequest request, HttpServletResponse response) throws IOException { logger.info(EELFLoggerDelegate.debugLogger, PROFILE_CONTAINER ); |