summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-06-10 11:29:18 +0530
committerRupinder <rupinsi1@in.ibm.com>2020-06-10 11:29:30 +0530
commit7f067ddf973c99872578998acba58116023b29d8 (patch)
treef52867c6145bfdd64e2950a826e1f99dc1acaf86 /ecomp-sdk
parent564dcdbcb8dce99e1df425a1f10f11467f5b5301 (diff)
added proper annotations
Issue-ID: PORTAL-865 Change-Id: I8f38ca9a4badf5d0ca4225eda6c653ec296ad4a4 Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk')
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleFunctionListController.java13
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleListController.java11
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/SDKLoginController.java11
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);
}