summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunder Tattavarada <statta@research.att.com>2020-07-07 17:04:36 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-07 17:04:36 +0000
commitab2f016cd35f91b22d0f8f1bdc041e701d894eaa (patch)
tree5dbe8d6787fd5402be6a9a91091df19667b2b259
parent2f8b2440cde09d5b4a4a3fd280c5c81504a30976 (diff)
parentf693803ff39896fdbaac8ffcf0cd488cb9cd29c6 (diff)
Merge "put proper annotations"
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java8
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java17
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 24e44d4b..0a928cf7 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();
@@ -179,7 +179,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");