summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-06-11 11:24:29 +0530
committerRupinder <rupinsi1@in.ibm.com>2020-06-11 11:24:41 +0530
commit9a68b658bd81c4928b5674bd31fbb704ba817a89 (patch)
treedbc4547a473bbf319f2412fe7111e342cb8665eb
parent564dcdbcb8dce99e1df425a1f10f11467f5b5301 (diff)
lowered code smells
Issue-ID: PORTAL-865 Change-Id: I62360d0e01bac44dfac7eceab2412426af7fdea1 Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/LeafletMapContoller.java4
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/NetMapController.java6
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java11
3 files changed, 11 insertions, 10 deletions
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/LeafletMapContoller.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/LeafletMapContoller.java
index bc9e2667..65e2c7aa 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/LeafletMapContoller.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/LeafletMapContoller.java
@@ -40,7 +40,7 @@ package org.onap.portalapp.controller.sample;
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.RequestMethod;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
/**
@@ -52,7 +52,7 @@ import org.springframework.web.servlet.ModelAndView;
@RequestMapping("/")
public class LeafletMapContoller extends RestrictedBaseController {
- @RequestMapping(value = { "/leafletMap" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/leafletMap" })
public ModelAndView plot() {
final String defaultViewName = null;
return new ModelAndView(defaultViewName);
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/NetMapController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/NetMapController.java
index f3f739f4..d8c9d8ab 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/NetMapController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/NetMapController.java
@@ -45,7 +45,7 @@ import javax.servlet.http.HttpServletRequest;
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.RequestMethod;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
/**
@@ -56,7 +56,7 @@ import org.springframework.web.servlet.ModelAndView;
@RequestMapping("/")
public class NetMapController extends RestrictedBaseController {
- @RequestMapping(value = { "/net_map" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/net_map" })
public ModelAndView plot(HttpServletRequest request) {
Map<String, Object> model = new HashMap<>();
model.put("frame_int", "net_map_int");
@@ -64,7 +64,7 @@ public class NetMapController extends RestrictedBaseController {
return new ModelAndView("frame_insert", model);
}
- @RequestMapping(value = { "/net_map_int" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/net_map_int" })
public ModelAndView plot2() {
// The view name defaults to the request without any suffix.
final String defaultViewName = null;
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java
index cf7fa06a..e0a2fdba 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java
@@ -52,7 +52,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.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;
@@ -68,12 +69,12 @@ public class PostDroolsController extends RestrictedBaseController {
@Autowired
private PostDroolsService postDroolsService;
- @RequestMapping(value = { "/drools" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/drools" })
public ModelAndView drools(HttpServletRequest request) {
return new ModelAndView(getViewName());
}
- @RequestMapping(value = { "/getDrools" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/getDrools" })
public void getDrools(HttpServletRequest request, HttpServletResponse response) {
@@ -88,7 +89,7 @@ public class PostDroolsController extends RestrictedBaseController {
}
}
- @RequestMapping(value = { "/getDroolDetails" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/getDroolDetails" })
public void getDroolDetails(HttpServletRequest request, HttpServletResponse response) {
ObjectMapper mapper = new ObjectMapper();
@@ -108,7 +109,7 @@ public class PostDroolsController extends RestrictedBaseController {
}
}
- @RequestMapping(value = { "/post_drools/execute" }, method = RequestMethod.POST)
+ @PostMapping(value = { "/post_drools/execute" })
public ModelAndView search(HttpServletRequest request, HttpServletResponse response) {
try {
ObjectMapper mapper = new ObjectMapper();