aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/controllers/ChangeManagementController.java
diff options
context:
space:
mode:
authorSonsino, Ofir (os0695) <os0695@intl.att.com>2018-07-10 14:20:54 +0300
committerSonsino, Ofir (os0695) <os0695@intl.att.com>2018-07-10 14:20:54 +0300
commitc72d565bb58226b20625b2bce5f0019046bee649 (patch)
tree8658e49595705b02e47ddc14afa20d6bb7123547 /vid-app-common/src/main/java/org/onap/vid/controllers/ChangeManagementController.java
parentef8a6b47847012fd59ea20da21d8d3d7c4a301ed (diff)
Merge 1806 code of vid-common
Change-Id: I75d52abed4a24dfe3827d79edc4a2938726aa87a Issue-ID: VID-208 Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/controllers/ChangeManagementController.java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controllers/ChangeManagementController.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controllers/ChangeManagementController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/ChangeManagementController.java
index fc5bc0b2..59fe61fd 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controllers/ChangeManagementController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controllers/ChangeManagementController.java
@@ -23,7 +23,6 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.WebApplicationException;
-import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
@@ -36,7 +35,6 @@ import static org.springframework.http.HttpStatus.*;
@RestController
@RequestMapping(ChangeManagementController.CHANGE_MANAGEMENT)
public class ChangeManagementController extends UnRestrictedBaseController {
- private static final String GetWorkflowsResponse = null;
public static final String VNF_WORKFLOW_RELATION = "vnf_workflow_relation";
public static final String CHANGE_MANAGEMENT = "change-management";
public static final String GET_VNF_WORKFLOW_RELATION = "get_vnf_workflow_relation";
@@ -57,13 +55,13 @@ public class ChangeManagementController extends UnRestrictedBaseController {
}
@RequestMapping(value = {"/workflow"}, method = RequestMethod.GET)
- public ResponseEntity<Collection<String>> getWorkflow(@RequestParam("vnfs") Collection<String> vnfs) throws IOException, InterruptedException {
+ public ResponseEntity<Collection<String>> getWorkflow(@RequestParam("vnfs") Collection<String> vnfs) {
Collection<String> result = this.workflowService.getWorkflowsForVNFs(vnfs);
return new ResponseEntity<>(result, OK);
}
@RequestMapping(value = {"/mso"}, method = RequestMethod.GET)
- public ResponseEntity<Collection<Request>> getMSOChangeManagements() throws Exception, IOException, InterruptedException {
+ public ResponseEntity<Collection<Request>> getMSOChangeManagements() {
Collection<Request> result = this.changeManagementService.getMSOChangeManagements();
return new ResponseEntity<>(result, OK);
@@ -94,20 +92,20 @@ public class ChangeManagementController extends UnRestrictedBaseController {
@RequestMapping(value = {"/scheduler"}, method = RequestMethod.GET)
- public ResponseEntity<JSONArray> getSchedulerChangeManagements() throws IOException, InterruptedException {
+ public ResponseEntity<JSONArray> getSchedulerChangeManagements() {
JSONArray result = this.changeManagementService.getSchedulerChangeManagements();
return new ResponseEntity<>(result, OK);
}
@RequestMapping(value = {SCHEDULER_BY_SCHEDULE_ID}, method = RequestMethod.DELETE)
- public ResponseEntity deleteSchedule(@PathVariable("scheduleId") String scheduleId) throws IOException, InterruptedException {
+ public ResponseEntity deleteSchedule(@PathVariable("scheduleId") String scheduleId) {
Pair<String, Integer> result = this.changeManagementService.deleteSchedule(scheduleId);
return ResponseEntity.status(result.getRight()).build();
}
@RequestMapping(value = {GET_VNF_WORKFLOW_RELATION}, method = RequestMethod.POST)
- public ResponseEntity getWorkflows(@RequestBody GetVnfWorkflowRelationRequest getVnfWorkflowRelationRequest) throws IOException, InterruptedException {
+ public ResponseEntity getWorkflows(@RequestBody GetVnfWorkflowRelationRequest getVnfWorkflowRelationRequest) {
try {
GetWorkflowsResponse response = new GetWorkflowsResponse(changeManagementService.getWorkflowsForVnf(getVnfWorkflowRelationRequest));
return ResponseEntity.status(OK).body(response);
@@ -122,7 +120,7 @@ public class ChangeManagementController extends UnRestrictedBaseController {
}
@RequestMapping(value = {VNF_WORKFLOW_RELATION}, method = RequestMethod.POST)
- public ResponseEntity createWorkflowRelation(@RequestBody VnfWorkflowRelationRequest vnfWorkflowRelationRequest) throws IOException, InterruptedException {
+ public ResponseEntity createWorkflowRelation(@RequestBody VnfWorkflowRelationRequest vnfWorkflowRelationRequest) {
VnfWorkflowRelationResponse vnfWorkflowRelationResponse;
try {
vnfWorkflowRelationResponse = changeManagementService.addVnfWorkflowRelation(vnfWorkflowRelationRequest);
@@ -135,7 +133,7 @@ public class ChangeManagementController extends UnRestrictedBaseController {
}
@RequestMapping(value = {VNF_WORKFLOW_RELATION}, method = RequestMethod.GET)
- public ResponseEntity getAllWorkflowRelation() throws IOException, InterruptedException {
+ public ResponseEntity getAllWorkflowRelation() {
try {
VnfWorkflowRelationAllResponse vnfWorkflowRelationAllResponse = changeManagementService.getAllVnfWorkflowRelations();
@@ -147,7 +145,7 @@ public class ChangeManagementController extends UnRestrictedBaseController {
}
@RequestMapping(value = {VNF_WORKFLOW_RELATION}, method = RequestMethod.DELETE)
- public ResponseEntity deleteWorkflowRelation(@RequestBody VnfWorkflowRelationRequest vnfWorkflowRelationRequest) throws IOException, InterruptedException {
+ public ResponseEntity deleteWorkflowRelation(@RequestBody VnfWorkflowRelationRequest vnfWorkflowRelationRequest) {
VnfWorkflowRelationResponse vnfWorkflowRelationResponse;
try {
vnfWorkflowRelationResponse = changeManagementService.deleteVnfWorkflowRelation(vnfWorkflowRelationRequest);