summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-04-24 17:01:43 +0530
committerRupinder <rupinsi1@in.ibm.com>2020-04-24 17:01:49 +0530
commitd12de53c04b0ededda7a2811819e744d15d38864 (patch)
tree480572bb420287617baea28330cc2be5bcde2875
parent9ac990d143c7eb57424609a091308245d3072466 (diff)
added appropriate annotation
Issue-ID: PORTAL-865 Change-Id: I7e48fe4e6c9fbb4021b1d465b74f514969bcb20d Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AdminController.java5
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AngularAdminController.java5
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/CacheAdminController.java13
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FnMenuController.java14
4 files changed, 22 insertions, 15 deletions
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AdminController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AdminController.java
index 9a8f9b8a..bf18decb 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AdminController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AdminController.java
@@ -44,6 +44,7 @@ import java.util.Map;
import org.onap.portalsdk.core.controller.RestrictedBaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
@@ -52,13 +53,13 @@ public class AdminController {
@RequestMapping("/")
public class AngularSinglePageController extends RestrictedBaseController {
- @RequestMapping(value = { "/admin" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/admin" })
public ModelAndView view() {
Map<String, Object> model = new HashMap<>();
return new ModelAndView("admin", "model", model);
}
- @RequestMapping(value = { "/admin2" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/admin2" })
public ModelAndView adminView() {
Map<String, Object> model = new HashMap<>();
return new ModelAndView("admin2", "model", model);
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AngularAdminController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AngularAdminController.java
index 138a805d..3368ce49 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AngularAdminController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AngularAdminController.java
@@ -43,6 +43,7 @@ import java.util.Map;
import org.onap.portalsdk.core.controller.RestrictedBaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
@@ -50,13 +51,13 @@ import org.springframework.web.servlet.ModelAndView;
@RequestMapping("/")
public class AngularAdminController extends RestrictedBaseController{
- @RequestMapping(value = {"/userProfile" }, method = RequestMethod.GET)
+ @GetMapping(value = {"/userProfile" })
public ModelAndView view() {
Map<String, Object> model = new HashMap<>();
return new ModelAndView("user_profile_list","model", model);
}
- @RequestMapping(value = {"/admin" }, method = RequestMethod.GET)
+ @GetMapping(value = {"/admin" })
public ModelAndView adminView() {
Map<String, Object> model = new HashMap<>();
return new ModelAndView(getViewName(),"model", model);
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/CacheAdminController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/CacheAdminController.java
index f30ab9b3..c102f886 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/CacheAdminController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/CacheAdminController.java
@@ -60,6 +60,7 @@ import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.web.support.JsonMessage;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
@@ -84,7 +85,7 @@ public class CacheAdminController extends RestrictedBaseController {
return new ModelAndView(getViewName(), model);
}
- @RequestMapping(value = { "/get_regions" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/get_regions" })
public void getRegions(HttpServletResponse response) {
try {
JsonMessage msg = new JsonMessage(getRegions().toString());
@@ -95,7 +96,7 @@ public class CacheAdminController extends RestrictedBaseController {
}
}
- @RequestMapping(value = { "/jcs_admin/clearRegion" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/jcs_admin/clearRegion" })
public void clearRegion(HttpServletRequest request, HttpServletResponse response) throws IOException {
String cacheName = request.getParameter(CACHE_NAME);
clearCacheRegion(cacheName);
@@ -104,7 +105,7 @@ public class CacheAdminController extends RestrictedBaseController {
out.write(getRegions().toString());
}
- @RequestMapping(value = { "/jcs_admin/clearAll" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/jcs_admin/clearAll" })
public void clearAll(HttpServletResponse response) throws IOException {
clearAllRegions();
response.setContentType(APPLICATION_JSON);
@@ -112,7 +113,7 @@ public class CacheAdminController extends RestrictedBaseController {
out.write(getRegions().toString());
}
- @RequestMapping(value = { "/jcs_admin/clearItem" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/jcs_admin/clearItem" })
public void clearItem(HttpServletRequest request, HttpServletResponse response) throws IOException {
String keyName = request.getParameter("keyName");
String cacheName = request.getParameter(CACHE_NAME);
@@ -122,7 +123,7 @@ public class CacheAdminController extends RestrictedBaseController {
out.write(getRegions().toString());
}
- @RequestMapping(value = { "/jcs_admin/showItemDetails" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/jcs_admin/showItemDetails" })
public void showItemDetails(HttpServletRequest request, HttpServletResponse response) throws IOException {
String cacheName = request.getParameter(CACHE_NAME);
String keyName = request.getParameter("keyName");
@@ -139,7 +140,7 @@ public class CacheAdminController extends RestrictedBaseController {
out.write(j.toString());
}
- @RequestMapping(value = { "/jcs_admin/showRegionDetails" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/jcs_admin/showRegionDetails" })
public void showRegionDetails(HttpServletRequest request, HttpServletResponse response) {
String cacheName = request.getParameter(CACHE_NAME);
ObjectMapper mapper = new ObjectMapper();
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FnMenuController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FnMenuController.java
index 8f49b640..82da2eb8 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FnMenuController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FnMenuController.java
@@ -4,6 +4,8 @@
* ===================================================================
* Copyright © 2017 AT&T Intellectual Property. All rights reserved.
* ===================================================================
+ * Modification Copyright © 2020 IBM.
+ * ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
* under the Apache License, Version 2.0 (the "License");
@@ -58,6 +60,8 @@ import org.onap.portalsdk.core.web.support.JsonMessage;
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.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
@@ -82,7 +86,7 @@ public class FnMenuController extends RestrictedBaseController {
@Autowired
FunctionalMenuListService functionalMenuListService;
- @RequestMapping(value = { "/admin_fn_menu/get_parent_list" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/admin_fn_menu/get_parent_list" })
public void getParentList(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException {
ObjectMapper mapper = new ObjectMapper();
try {
@@ -95,7 +99,7 @@ public class FnMenuController extends RestrictedBaseController {
}
}
- @RequestMapping(value = { "/admin_fn_menu/get_function_cd_list" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/admin_fn_menu/get_function_cd_list" })
public void getFunctionCDList(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException {
ObjectMapper mapper = new ObjectMapper();
try {
@@ -109,7 +113,7 @@ public class FnMenuController extends RestrictedBaseController {
}
- @RequestMapping(value = { "/admin_fn_menu" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/admin_fn_menu" })
public void getFnMenuList(HttpServletRequest request, HttpServletResponse response) {
Map<String, Object> model = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
@@ -152,7 +156,7 @@ public class FnMenuController extends RestrictedBaseController {
}
- @RequestMapping(value = { "/admin_fn_menu/updateFnMenu" }, method = RequestMethod.POST)
+ @PostMapping(value = { "/admin_fn_menu/updateFnMenu" })
public ModelAndView updateFnMenu(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, java.io.UnsupportedEncodingException {
@@ -189,7 +193,7 @@ public class FnMenuController extends RestrictedBaseController {
}
- @RequestMapping(value = { "/admin_fn_menu/removeMenuItem" }, method = RequestMethod.POST)
+ @PostMapping(value = { "/admin_fn_menu/removeMenuItem" })
public ModelAndView removeFnMenu(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, java.io.UnsupportedEncodingException {