diff options
author | Sunder Tattavarada <statta@research.att.com> | 2020-07-07 17:04:01 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-07-07 17:04:01 +0000 |
commit | 2f8b2440cde09d5b4a4a3fd280c5c81504a30976 (patch) | |
tree | 290cda21fc52d3227d2ff7dd107339b432ff5c9c | |
parent | e50776db662555e4424a48c583ce39d79aea472e (diff) | |
parent | 7f067ddf973c99872578998acba58116023b29d8 (diff) |
Merge "added proper annotations"
3 files changed, 19 insertions, 16 deletions
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleFunctionListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleFunctionListController.java index 4ac5f37a..ad41a9cc 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleFunctionListController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleFunctionListController.java @@ -57,7 +57,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; 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.ObjectMapper; @@ -74,7 +75,7 @@ public class RoleFunctionListController extends RestrictedBaseController { private String viewName; - @RequestMapping(value = { "/role_function_list" }, method = RequestMethod.GET) + @GetMapping(value = { "/role_function_list" }) public ModelAndView welcome(HttpServletRequest request) { Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -88,7 +89,7 @@ public class RoleFunctionListController extends RestrictedBaseController { return new ModelAndView(getViewName(), model); } - @RequestMapping(value = { "/get_role_functions" }, method = RequestMethod.GET) + @GetMapping(value = { "/get_role_functions" }) public void getRoleFunctionList(HttpServletRequest request, HttpServletResponse response) { Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -104,7 +105,7 @@ public class RoleFunctionListController extends RestrictedBaseController { } } - @RequestMapping(value = { "/role_function_list/saveRoleFunction" }, method = RequestMethod.POST) + @PostMapping(value = { "/role_function_list/saveRoleFunction" }) public void saveRoleFunction(HttpServletRequest request, HttpServletResponse response, @RequestBody String roleFunc) throws IOException { ObjectMapper mapper = new ObjectMapper(); @@ -129,7 +130,7 @@ public class RoleFunctionListController extends RestrictedBaseController { response.getWriter().write(j.toString()); } - @RequestMapping(value = { "/role_function_list/addRoleFunction" }, method = RequestMethod.POST) + @PostMapping(value = { "/role_function_list/addRoleFunction" }) public void addRoleFunction(HttpServletRequest request, HttpServletResponse response, @RequestBody String roleFunc) throws IOException { ObjectMapper mapper = new ObjectMapper(); @@ -161,7 +162,7 @@ public class RoleFunctionListController extends RestrictedBaseController { response.getWriter().write(j.toString()); } - @RequestMapping(value = { "/role_function_list/removeRoleFunction" }, method = RequestMethod.POST) + @PostMapping(value = { "/role_function_list/removeRoleFunction" }) public void removeRoleFunction(HttpServletRequest request, HttpServletResponse response, @RequestBody String roleFunc) throws IOException { ObjectMapper mapper = new ObjectMapper(); diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleListController.java index 0360770e..53b1945e 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleListController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleListController.java @@ -58,7 +58,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; @@ -81,7 +82,7 @@ public class RoleListController extends RestrictedBaseController { private static final String isCentralized = "remote"; - @RequestMapping(value = { "/role_list" }, method = RequestMethod.GET) + @GetMapping(value = { "/role_list" }) public ModelAndView getRoleList(HttpServletRequest request) { Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -94,7 +95,7 @@ public class RoleListController extends RestrictedBaseController { return new ModelAndView(getViewName(), model); } - @RequestMapping(value = { "/get_roles" }, method = RequestMethod.GET) + @GetMapping(value = { "/get_roles" }) public void getRoles(HttpServletRequest request, HttpServletResponse response) { Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -109,7 +110,7 @@ public class RoleListController extends RestrictedBaseController { } } - @RequestMapping(value = { "/role_list/toggleRole" }, method = RequestMethod.POST) + @PostMapping(value = { "/role_list/toggleRole" }) public ModelAndView toggleRole(HttpServletRequest request, HttpServletResponse response) throws IOException { User user = UserUtils.getUserSession(request); try { @@ -147,7 +148,7 @@ public class RoleListController extends RestrictedBaseController { } - @RequestMapping(value = { "/role_list/removeRole" }, method = RequestMethod.POST) + @PostMapping(value = { "/role_list/removeRole" }) public ModelAndView removeRole(HttpServletRequest request, HttpServletResponse response) throws IOException { User user = UserUtils.getUserSession(request); diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/SDKLoginController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/SDKLoginController.java index 6418b1e1..a585b9f7 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/SDKLoginController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/SDKLoginController.java @@ -53,7 +53,8 @@ import org.onap.portalsdk.core.web.support.AppUtils; 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; @Controller @@ -68,24 +69,24 @@ public class SDKLoginController extends UnRestrictedBaseController { private String viewName; - @RequestMapping(value = { "/login.htm" }, method = RequestMethod.GET) + @GetMapping(value = { "/login.htm" }) public ModelAndView login() { Map<String, Object> model = new HashMap<>(); return new ModelAndView("login", "model", model); } - @RequestMapping(value = { "/login_external.htm" }, method = RequestMethod.GET) + @GetMapping(value = { "/login_external.htm" }) public ModelAndView externalLogin() { Map<String, Object> model = new HashMap<>(); return new ModelAndView("login_external", "model", model); } - @RequestMapping(value = { "/login_external" }, method = RequestMethod.POST) + @PostMapping(value = { "/login_external" }) public ModelAndView doexternalLogin(HttpServletRequest request, HttpServletResponse response) throws IOException { return loginStrategy.doExternalLogin(request, response); } - @RequestMapping(value = { "/doLogin" }, method = RequestMethod.GET) + @GetMapping(value = { "/doLogin" }) public ModelAndView doLogin(HttpServletRequest request, HttpServletResponse response) throws Exception { return loginStrategy.doLogin(request, response); } |