diff options
author | Rupinder <rupinsi1@in.ibm.com> | 2020-05-06 14:51:43 +0530 |
---|---|---|
committer | Rupinder <rupinsi1@in.ibm.com> | 2020-05-06 14:52:26 +0530 |
commit | cc373b240c7fab9f1ddc92ac1bbee1e79ccf5e73 (patch) | |
tree | c66b52c152d6ea4b975d0a4b22ac86aa0ffa2266 | |
parent | c2f7d24209a7f9b27b2fdd870539529046ae5c24 (diff) |
replaced the annotations
Issue-ID: USECASEUI-423
Change-Id: I0b38f2e8d9dac7d1fb0e3e0058a5840f69592987
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
-rw-r--r-- | server/src/main/java/org/onap/usecaseui/server/controller/nsmf/TaskMgtController.java | 20 | ||||
-rw-r--r-- | server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java | 41 |
2 files changed, 33 insertions, 28 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/TaskMgtController.java b/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/TaskMgtController.java index 07c2cadf..71a66532 100644 --- a/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/TaskMgtController.java +++ b/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/TaskMgtController.java @@ -25,6 +25,8 @@ import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; @@ -43,41 +45,41 @@ public class TaskMgtController { } @ResponseBody - @RequestMapping(value = { - "/business/pageNo/{pageNo}/pageSize/{pageSize}"}, method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = { + "/business/pageNo/{pageNo}/pageSize/{pageSize}"}, produces = "application/json") public ServiceResult querySlicingTask(@PathVariable int pageNo, @PathVariable int pageSize) { return taskMgtService.querySlicingTask(pageNo, pageSize); } @ResponseBody - @RequestMapping(value = { - "/{processingStatus}/business/pageNo/{pageNo}/pageSize/{pageSize}"}, method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = { + "/{processingStatus}/business/pageNo/{pageNo}/pageSize/{pageSize}"}, produces = "application/json") public ServiceResult querySlicingTaskByStatus(@PathVariable String processingStatus, @PathVariable int pageNo, @PathVariable int pageSize) { return taskMgtService.querySlicingTaskByStatus(processingStatus, pageNo, pageSize); } @ResponseBody - @RequestMapping(value = {"/{taskId}/auditInfo"}, method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = {"/{taskId}/auditInfo"}, produces = "application/json") public ServiceResult queryTaskAuditInfo(@PathVariable String taskId) { return taskMgtService.queryTaskAuditInfo(taskId); } @ResponseBody - @RequestMapping(value = {"/auditInfo"}, method = RequestMethod.PUT, produces = "application/json") + @PutMapping(value = {"/auditInfo"}, produces = "application/json") public ServiceResult updateTaskAuditInfo(@RequestBody SlicingTaskAuditInfo slicingTaskAuditInfo) { return taskMgtService.updateTaskAuditInfo(slicingTaskAuditInfo); } @ResponseBody - @RequestMapping(value = {"/{taskId}/taskCreationInfo"}, method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = {"/{taskId}/taskCreationInfo"}, produces = "application/json") public ServiceResult queryTaskCreationInfo(@PathVariable String taskId) { return taskMgtService.queryTaskCreationInfo(taskId); } @ResponseBody - @RequestMapping(value = { - "/{taskId}/taskCreationProgress"}, method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = { + "/{taskId}/taskCreationProgress"}, produces = "application/json") public ServiceResult queryTaskCreationProgress(@PathVariable String taskId) { return taskMgtService.queryTaskCreationProgress(taskId); } diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java b/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java index 5b84d8c6..3cff1ef6 100644 --- a/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java +++ b/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java @@ -31,6 +31,9 @@ import org.onap.usecaseui.server.util.UuiCommonUtil; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -54,7 +57,7 @@ public class SotnController { this.sotnService = sotnService; } - @RequestMapping(value = {"/getNetWorkResources"}, method = RequestMethod.GET) + @GetMapping(value = {"/getNetWorkResources"}) public List<NetWorkResource> getNetWorkResources(){ List<NetWorkResource> result = new ArrayList<NetWorkResource>(); String json = sotnService.getNetWorkResources(); @@ -74,62 +77,62 @@ public class SotnController { return result; } - @RequestMapping(value = {"/getPinterfaceByPnfName/{pnfName:.+}"}, method = RequestMethod.GET) + @GetMapping(value = {"/getPinterfaceByPnfName/{pnfName:.+}"}) public List<Pinterface> getPinterfaceByPnfName(@PathVariable(value="pnfName") String pnfName){ return sotnService.getPinterfaceByPnfName(pnfName); } - @RequestMapping(value = {"/getLogicalLinks"}, method = RequestMethod.GET) + @GetMapping(value = {"/getLogicalLinks"}) public String getLogicalLinks(){ return sotnService.getLogicalLinks(); } - @RequestMapping(value = {"/getSpecificLogicalLink/{linkName:.+}"}, method = RequestMethod.GET) + @GetMapping(value = {"/getSpecificLogicalLink/{linkName:.+}"}) public String getSpecificLogicalLink(@PathVariable(value="linkName") String linkName){ return sotnService.getSpecificLogicalLink(linkName); } - @RequestMapping(value = {"/getHostUrl/{aaiId:.+}"}, method = RequestMethod.GET) + @GetMapping(value = {"/getHostUrl/{aaiId:.+}"}) public String getHostUrl(@PathVariable(value="aaiId") String aaiId){ return sotnService.getHostUrl(aaiId); } - @RequestMapping(value = {"/getExtAaiId/{aaiId:.+}"}, method = RequestMethod.GET) + @GetMapping(value = {"/getExtAaiId/{aaiId:.+}"}) public String getExtAaiId(@PathVariable(value="aaiId") String aaiId){ return sotnService.getExtAaiId(aaiId); } - @RequestMapping(value = {"/createHostUrl/{aaiId:.+}"}, method = RequestMethod.PUT) + @PutMapping(value = {"/createHostUrl/{aaiId:.+}"}) public String createHostUrl(HttpServletRequest request,@PathVariable(value="aaiId") String aaiId){ return sotnService.createHostUrl(request, aaiId); } - @RequestMapping(value = {"/createTopoNetwork/{networkId:.+}"}, method = RequestMethod.PUT) + @PutMapping(value = {"/createTopoNetwork/{networkId:.+}"}) public String createTopoNetwork(HttpServletRequest request,@PathVariable(value="networkId") String networkId){ return sotnService.createTopoNetwork(request,networkId); } - @RequestMapping(value = {"/pnf/{pnfName:.+}/p-interfaces/p-interface/{tp-id:.+}/createTerminationPoint"}, method = RequestMethod.PUT) + @PutMapping(value = {"/pnf/{pnfName:.+}/p-interfaces/p-interface/{tp-id:.+}/createTerminationPoint"}) public String createTerminationPoint(HttpServletRequest request,@PathVariable(value="pnfName") String pnfName,@PathVariable(value="tp-id") String tpId){ return sotnService.createTerminationPoint(request,pnfName,tpId); } - @RequestMapping(value = {"/createLink/{linkName:.+}"}, method = RequestMethod.PUT) + @PutMapping(value = {"/createLink/{linkName:.+}"}) public String createLink(HttpServletRequest request,@PathVariable(value="linkName") String linkName){ return sotnService.createLink(request, linkName); } - @RequestMapping(value = {"/createPnf/{pnfName:.+}"}, method = RequestMethod.PUT) + @PutMapping(value = {"/createPnf/{pnfName:.+}"}) public String createPnf(HttpServletRequest request,@PathVariable(value="pnfName") String pnfName){ return sotnService.createPnf(request, pnfName); } - @RequestMapping(value = {"/deleteLink/{linkName:.+}/{resourceVersion:.+}"}, method = RequestMethod.DELETE) + @DeleteMapping(value = {"/deleteLink/{linkName:.+}/{resourceVersion:.+}"}) public String deleteLink(@PathVariable(value="linkName") String linkName,@PathVariable(value="resourceVersion") String resourceVersion){ return sotnService.deleteLink(linkName,resourceVersion); } - @RequestMapping(value = {"/getServiceInstanceInfo"}, method = RequestMethod.GET) + @GetMapping(value = {"/getServiceInstanceInfo"}) public String getServiceInstanceInfo(HttpServletRequest request){ String customerId = request.getParameter("customerId"); String serviceType = request.getParameter("serviceType"); @@ -137,12 +140,12 @@ public class SotnController { return sotnService.serviceInstanceInfo(customerId, serviceType, serviceId); } - @RequestMapping(value = {"/getPnfInfo/{pnfName:.+}"}, method = RequestMethod.GET) + @GetMapping(value = {"/getPnfInfo/{pnfName:.+}"}) public String getPnfInfo(@PathVariable(value="pnfName") String pnfName){ return sotnService.getPnfInfo(pnfName); } - @RequestMapping(value = {"/getAllottedResources"}, method = RequestMethod.GET) + @GetMapping(value = {"/getAllottedResources"}) public String getAllottedResources(HttpServletRequest request){ String customerId = request.getParameter("customerId"); String serviceType = request.getParameter("serviceType"); @@ -150,24 +153,24 @@ public class SotnController { return sotnService.getAllottedResources(customerId, serviceType,serviceId); } - @RequestMapping(value = {"/getConnectivityInfo/{connectivityId:.+}"}, method = RequestMethod.GET) + @GetMapping(value = {"/getConnectivityInfo/{connectivityId:.+}"}) public String getConnectivityInfo(@PathVariable(value="connectivityId") String connectivityId){ return sotnService.getConnectivityInfo(connectivityId); } - @RequestMapping(value = {"/getPinterfaceByVpnId/{vpnId:.+}"}, method = RequestMethod.GET) + @GetMapping(value = {"/getPinterfaceByVpnId/{vpnId:.+}"}) public String getPinterfaceByVpnId(@PathVariable(value="vpnId") String vpnId){ return sotnService.getPinterfaceByVpnId(vpnId); } - @RequestMapping(value = {"/getServiceInstanceList"}, method = RequestMethod.GET) + @GetMapping(value = {"/getServiceInstanceList"}) public String getServiceInstanceList(HttpServletRequest request){ String customerId = request.getParameter("customerId"); String serviceType = request.getParameter("serviceType"); return sotnService.getServiceInstances(customerId, serviceType); } - @RequestMapping(value = {"/deleteExtNetWork"}, method = RequestMethod.DELETE) + @DeleteMapping(value = {"/deleteExtNetWork"}) public String deleteExtNetwork(@RequestParam String extNetworkId,@RequestParam(value="resourceVersion") String resourceVersion){ return sotnService.deleteExtNetwork(extNetworkId,resourceVersion); } |