aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-requests-db-adapter
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2020-05-19 14:48:03 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-19 14:48:03 +0000
commit16d7704be3276710e53ef61cf01ed5fda066a827 (patch)
tree373a34f8a2a8dc5e3c711fba76dac1a5bfa56315 /adapters/mso-requests-db-adapter
parent5211f2ed7a4bc239893c7a7db345858e094cfce8 (diff)
parent9ca350ce747e9f425289acc7113038790b8532e4 (diff)
Merge "put appropriate annotations"
Diffstat (limited to 'adapters/mso-requests-db-adapter')
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java16
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/OrchestrationTaskRepositoryCustomController.java10
2 files changed, 13 insertions, 13 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java
index 28e931a3e1..2adba81f9e 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java
@@ -29,6 +29,8 @@ import org.springframework.beans.factory.annotation.Autowired;
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.PostMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@@ -39,27 +41,25 @@ public class InfraActiveRequestsRepositoryCustomController {
@Autowired
InfraActiveRequestsRepository infraActiveRequestsRepository;
- @RequestMapping(method = RequestMethod.POST,
- value = "/infraActiveRequests/getCloudOrchestrationFiltersFromInfraActive")
+ @PostMapping(value = "/infraActiveRequests/getCloudOrchestrationFiltersFromInfraActive")
public List<InfraActiveRequests> getCloudOrchestrationFiltersFromInfraActive(
@RequestBody Map<String, String> orchestrationMap) {
return infraActiveRequestsRepository.getCloudOrchestrationFiltersFromInfraActive(orchestrationMap);
}
- @RequestMapping(method = RequestMethod.POST, value = "/infraActiveRequests/getOrchestrationFiltersFromInfraActive")
+ @PostMapping(value = "/infraActiveRequests/getOrchestrationFiltersFromInfraActive")
public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(
@RequestBody Map<String, List<String>> orchestrationMap) {
return infraActiveRequestsRepository.getOrchestrationFiltersFromInfraActive(orchestrationMap);
}
- @RequestMapping(method = RequestMethod.GET,
- value = "/infraActiveRequests/checkVnfIdStatus/{operationalEnvironmentId}")
+ @GetMapping(value = "/infraActiveRequests/checkVnfIdStatus/{operationalEnvironmentId}")
public InfraActiveRequests checkVnfIdStatus(
@PathVariable("operationalEnvironmentId") String operationalEnvironmentId) {
return infraActiveRequestsRepository.checkVnfIdStatus(operationalEnvironmentId);
}
- @RequestMapping(method = RequestMethod.POST, value = "/infraActiveRequests/checkInstanceNameDuplicate")
+ @PostMapping(value = "/infraActiveRequests/checkInstanceNameDuplicate")
public InfraActiveRequests checkInstanceNameDuplicate(
@RequestBody InstanceNameDuplicateCheckRequest instanceNameDuplicateCheckRequest) {
return infraActiveRequestsRepository.checkInstanceNameDuplicate(
@@ -68,14 +68,14 @@ public class InfraActiveRequestsRepositoryCustomController {
instanceNameDuplicateCheckRequest.getRequestScope());
}
- @RequestMapping(method = RequestMethod.POST, value = "/infraActiveRequests/v1/getInfraActiveRequests")
+ @PostMapping(value = "/infraActiveRequests/v1/getInfraActiveRequests")
public List<InfraActiveRequests> getInfraActiveRequests(@RequestBody Map<String, String[]> filters,
@RequestParam("from") long startTime, @RequestParam("to") long endTime,
@RequestParam(value = "maxResult", required = false) Integer maxResult) {
return infraActiveRequestsRepository.getInfraActiveRequests(filters, startTime, endTime, maxResult);
}
- @RequestMapping(method = RequestMethod.GET, value = "/infraActiveRequests/getInProgressVolumeGroupsAndVfModules")
+ @GetMapping(value = "/infraActiveRequests/getInProgressVolumeGroupsAndVfModules")
public List<InfraActiveRequests> getInProgressVolumeGroupsAndVfModules() {
return infraActiveRequestsRepository.getInProgressVolumeGroupsAndVfModules();
}
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/OrchestrationTaskRepositoryCustomController.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/OrchestrationTaskRepositoryCustomController.java
index e32d90b137..29585b94eb 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/OrchestrationTaskRepositoryCustomController.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/OrchestrationTaskRepositoryCustomController.java
@@ -33,29 +33,29 @@ public class OrchestrationTaskRepositoryCustomController {
@Autowired
private OrchestrationTaskRepository orchestrationTaskRepository;
- @RequestMapping(method = RequestMethod.GET, value = "/orchestrationTask")
+ @GetMapping(value = "/orchestrationTask")
public List<OrchestrationTask> getAllOrchestrationTask() {
return orchestrationTaskRepository.findAll();
}
- @RequestMapping(method = RequestMethod.GET, value = "/orchestrationTask/{taskId}")
+ @GetMapping(value = "/orchestrationTask/{taskId}")
public OrchestrationTask getOrchestrationTask(@PathVariable("taskId") String taskId) throws MsoRequestsDbException {
return orchestrationTaskRepository.findById(taskId)
.orElseThrow(() -> new MsoRequestsDbException("orchestration task not found: " + taskId));
}
- @RequestMapping(method = RequestMethod.POST, value = "/orchestrationTask/")
+ @PostMapping(value = "/orchestrationTask/")
public OrchestrationTask createOrchestrationTask(@RequestBody OrchestrationTask orchestrationTask) {
return orchestrationTaskRepository.save(orchestrationTask);
}
- @RequestMapping(method = RequestMethod.PUT, value = "/orchestrationTask/{taskId}")
+ @PutMapping(value = "/orchestrationTask/{taskId}")
public OrchestrationTask updateOrchestrationTask(@PathVariable("taskId") String taskId,
@RequestBody OrchestrationTask orchestrationTask) throws MsoRequestsDbException {
return orchestrationTaskRepository.save(orchestrationTask);
}
- @RequestMapping(method = RequestMethod.DELETE, value = "/orchestrationTask/{taskId}")
+ @DeleteMapping(value = "/orchestrationTask/{taskId}")
public void deleteOrchestrationTask(@PathVariable("taskId") String taskId) {
orchestrationTaskRepository.deleteById(taskId);
}