X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fcontroller%2FSchedulerController.java;h=532757635d3ca42e03526e8a2f1e1ba181718071;hb=858fda6824501c6d40a7fc5a130d2c04510c5231;hp=69f2568315ab27e848fbeb44ae975dfa9fdf7912;hpb=b90e14ca265fbecf60a8723dfdc603a28cca3e69;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/SchedulerController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/SchedulerController.java index 69f25683..53275763 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/SchedulerController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/SchedulerController.java @@ -77,6 +77,8 @@ import org.springframework.http.ResponseEntity; 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.PostMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; @@ -102,7 +104,7 @@ public class SchedulerController extends EPRestrictedBaseController { this.adminRolesService = adminRolesService; } - @RequestMapping(value = "/get_time_slots/{scheduler_request}", method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = "/get_time_slots/{scheduler_request}", produces = "application/json") public ResponseEntity getTimeSlots(HttpServletRequest request, @PathVariable("scheduler_request") String schedulerRequest) throws Exception { if (checkIfUserISValidToMakeSchedule(request)) { @@ -169,7 +171,7 @@ public class SchedulerController extends EPRestrictedBaseController { } @SuppressWarnings("unchecked") - @RequestMapping(value = "/post_create_new_vnf_change", method = RequestMethod.POST, produces = "application/json") + @PostMapping(value = "/post_create_new_vnf_change", produces = "application/json") public ResponseEntity postCreateNewVNFChange(HttpServletRequest request, @RequestBody JSONObject schedulerRequest) throws Exception { if (checkIfUserISValidToMakeSchedule(request)) { @@ -249,7 +251,7 @@ public class SchedulerController extends EPRestrictedBaseController { } } - @RequestMapping(value = "/submit_vnf_change_timeslots", method = RequestMethod.POST, produces = "application/json") + @PostMapping(value = "/submit_vnf_change_timeslots", produces = "application/json") public ResponseEntity postSubmitVnfChangeTimeslots(HttpServletRequest request, @RequestBody JSONObject schedulerRequest) throws Exception { if (checkIfUserISValidToMakeSchedule(request)) { @@ -335,7 +337,7 @@ public class SchedulerController extends EPRestrictedBaseController { * @return Rest response wrapped around a String; e.g., "success" or "ERROR" * @throws Exception */ - @RequestMapping(value = "/get_scheduler_constant", method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = "/get_scheduler_constant", produces = "application/json") public PortalRestResponse> getSchedulerConstant(HttpServletRequest request, HttpServletResponse response) throws Exception { logger.debug(EELFLoggerDelegate.debugLogger, "get scheduler constant");