blob: b693805d106e6868b6a7d2a931930dcddd449a9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
package org.onap.vid.controller;
import java.util.List;
import org.onap.portalsdk.core.controller.RestrictedBaseController;
import org.onap.vid.model.SOWorkflow;
import org.onap.vid.model.SOWorkflowParameterDefinitions;
import org.onap.vid.services.ExtWorkflowsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(WorkflowsController.WORKFLOWS_MANAGEMENT)
public class WorkflowsController extends RestrictedBaseController {
static final String WORKFLOWS_MANAGEMENT = "workflows-management";
private ExtWorkflowsService extWorkflowsService;
@Autowired
public WorkflowsController(ExtWorkflowsService extWorkflowsService) {
this.extWorkflowsService = extWorkflowsService;
}
@RequestMapping(value = "workflows", method = RequestMethod.GET)
public List<SOWorkflow> getWorkflows(@RequestParam(value = "vnfName") String vnfName){
return extWorkflowsService.getWorkflows(vnfName);
}
@RequestMapping(value = "workflow-parameters/{id}", method = RequestMethod.GET)
SOWorkflowParameterDefinitions getParameters(@PathVariable Long id) {
return extWorkflowsService.getWorkflowParameterDefinitions(id);
}
}
|