diff options
author | Rupinder <rupinsi1@in.ibm.com> | 2020-06-10 11:10:00 +0530 |
---|---|---|
committer | Rupinder <rupinsi1@in.ibm.com> | 2020-06-10 11:10:25 +0530 |
commit | f693803ff39896fdbaac8ffcf0cd488cb9cd29c6 (patch) | |
tree | 96f03483389d45ab11a60598048b68e5175ed30a /ecomp-sdk/epsdk-app-common | |
parent | 564dcdbcb8dce99e1df425a1f10f11467f5b5301 (diff) |
put proper annotations
Issue-ID: PORTAL-865
Change-Id: I8a8027708dc7c5e4a1548065a3cb5e6adee22eb8
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-common')
2 files changed, 13 insertions, 12 deletions
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java index ff80d413..98388dfa 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java @@ -65,7 +65,7 @@ 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.servlet.ModelAndView; import com.fasterxml.jackson.databind.ObjectMapper; @@ -90,7 +90,7 @@ public class ProfileSearchController extends RestrictedBaseController { @Autowired private LoginStrategy loginStrategy; - @RequestMapping(value = { "/profile_search" }, method = RequestMethod.GET) + @GetMapping(value = { "/profile_search" }) public ModelAndView profileSearch(HttpServletRequest request) { Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -107,7 +107,7 @@ public class ProfileSearchController extends RestrictedBaseController { } - @RequestMapping(value = { "/get_user_pagination" }, method = RequestMethod.GET) + @GetMapping(value = { "/get_user_pagination" }) public void getUserPagination(HttpServletRequest request, HttpServletResponse response) { Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -161,7 +161,7 @@ public class ProfileSearchController extends RestrictedBaseController { return model; } - @RequestMapping(value = { "/profile/toggleProfileActive" }, method = RequestMethod.GET) + @GetMapping(value = { "/profile/toggleProfileActive" }) public void toggleProfileActive(HttpServletRequest request, HttpServletResponse response) throws IOException { try { logger.info(EELFLoggerDelegate.applicationLogger, diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java index 6ee84dd5..2853b83e 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java @@ -63,7 +63,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.ServletRequestUtils; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.servlet.ModelAndView; import com.fasterxml.jackson.databind.DeserializationFeature; @@ -84,7 +85,7 @@ public class RoleController extends RestrictedBaseController { @Autowired private RoleService roleService; - @RequestMapping(value = { "/role" }, method = RequestMethod.GET) + @GetMapping(value = { "/role" }) public ModelAndView role(HttpServletRequest request) throws IOException { Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -106,7 +107,7 @@ public class RoleController extends RestrictedBaseController { return new ModelAndView(getViewName(), model); } - @RequestMapping(value = { "/get_role" }, method = RequestMethod.GET) + @GetMapping(value = { "/get_role" }) public void getRole(HttpServletRequest request, HttpServletResponse response) throws IOException { Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -148,7 +149,7 @@ public class RoleController extends RestrictedBaseController { * @throws IOException * If the write to the result project fails */ - @RequestMapping(value = { "/role/saveRole" }, method = RequestMethod.POST) + @PostMapping(value = { "/role/saveRole" }) public ModelAndView saveRole(HttpServletRequest request, HttpServletResponse response) throws IOException { JSONObject j = null; User user = UserUtils.getUserSession(request); @@ -209,7 +210,7 @@ public class RoleController extends RestrictedBaseController { return null; } - @RequestMapping(value = { "/role/removeRoleFunction" }, method = RequestMethod.POST) + @PostMapping(value = { "/role/removeRoleFunction" }) public ModelAndView removeRoleFunction(HttpServletRequest request, HttpServletResponse response) throws IOException { User user = UserUtils.getUserSession(request); logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.removeRoleFunction"); @@ -246,7 +247,7 @@ public class RoleController extends RestrictedBaseController { } - @RequestMapping(value = { "/role/addRoleFunction" }, method = RequestMethod.POST) + @PostMapping(value = { "/role/addRoleFunction" }) public ModelAndView addRoleFunction(HttpServletRequest request, HttpServletResponse response) throws IOException { User user = UserUtils.getUserSession(request); logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.removeRoleFunction"); @@ -283,7 +284,7 @@ public class RoleController extends RestrictedBaseController { } - @RequestMapping(value = { "/role/removeChildRole" }, method = RequestMethod.POST) + @PostMapping(value = { "/role/removeChildRole" }) public ModelAndView removeChildRole(HttpServletRequest request, HttpServletResponse response) throws IOException { User user = UserUtils.getUserSession(request); logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.removeChileRole"); @@ -319,7 +320,7 @@ public class RoleController extends RestrictedBaseController { } - @RequestMapping(value = { "/role/addChildRole" }, method = RequestMethod.POST) + @PostMapping(value = { "/role/addChildRole" }) public ModelAndView addChildRole(HttpServletRequest request, HttpServletResponse response) throws IOException { User user = UserUtils.getUserSession(request); logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.addChileRole"); |