summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-common/src/main
diff options
context:
space:
mode:
authorSunder Tattavarada <statta@research.att.com>2020-07-07 17:06:00 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-07 17:06:00 +0000
commit3ec1c8d71fb238253df0bc7427bd25e7af4ddffb (patch)
treeea65bc3f4ba95133e128a1b212d2e882786ad212 /ecomp-sdk/epsdk-app-common/src/main
parentce7bc5c005147e64e7cc55f60dcda0db5e4961a9 (diff)
parent9a68b658bd81c4928b5674bd31fbb704ba817a89 (diff)
Merge "lowered code smells"
Diffstat (limited to 'ecomp-sdk/epsdk-app-common/src/main')
-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();