aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-requests-db-adapter/src/main/java
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-05-06 16:19:55 +0530
committerRupinder <rupinsi1@in.ibm.com>2020-05-06 16:20:03 +0530
commit9ca350ce747e9f425289acc7113038790b8532e4 (patch)
tree824da160cbb338b281318e997608dbce98fc4178 /adapters/mso-requests-db-adapter/src/main/java
parent391b1183cced64f2769fe1f2c3cf5b3f696c1d46 (diff)
put appropriate annotations
Issue-ID: SO-2804 Change-Id: I325543a52c13f7bb02c6cf3c30bf9f878617c3c0 Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
Diffstat (limited to 'adapters/mso-requests-db-adapter/src/main/java')
-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);
}