aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2019-04-22 17:17:18 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2019-04-23 10:50:17 +0800
commit62a2498304893dd8db50d03f371e3add5514ddfd (patch)
tree6088b3584ef76bff049fd60b74cbbce02c03ccd6
parentbbc003bbf57c5d3b639d4a0daef9353d10bfbb54 (diff)
Add backend Code for serviceType management UI page
Change-Id: Iafb5313dab7ce05037f2342cb5d1fc58c69238ef Issue-ID: USECASEUI-213 Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/CustomerController.java4
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/CustomerService.java2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java2
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerService.java4
4 files changed, 6 insertions, 6 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/CustomerController.java b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/CustomerController.java
index 22bda7e4..62c9ed28 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/CustomerController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/CustomerController.java
@@ -77,8 +77,8 @@ public class CustomerController {
@ResponseBody
@RequestMapping(value={"/uui-lcm/customers/{customerId}/service-subscriptions/{serviceType}"},method = RequestMethod.PUT,produces="application/json")
- public JSONObject createOrUpdateServiceType(HttpServletRequest request,@PathVariable String serviceType){
- return customerService.createOrUpdateServiceType(request, serviceType);
+ public JSONObject createOrUpdateServiceType(HttpServletRequest request,@PathVariable String serviceType,@PathVariable String customerId){
+ return customerService.createOrUpdateServiceType(request, serviceType,customerId);
}
@ResponseBody
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/CustomerService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/CustomerService.java
index 2e906550..62f8d4a6 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/CustomerService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/CustomerService.java
@@ -36,7 +36,7 @@ public interface CustomerService {
List<AAIServiceSubscription> listServiceSubscriptions(String customerId);
- JSONObject createOrUpdateServiceType(HttpServletRequest request,String serviceType);
+ JSONObject createOrUpdateServiceType(HttpServletRequest request,String serviceType,String customerId);
JSONObject deleteServiceType(String customerId,String serviceType,String resourceVersion);
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java
index 58ce2cb5..fce94ba0 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java
@@ -132,7 +132,7 @@ public interface AAIService {
})
//@GET("/api/aai-business/v11/customers/customer/{global-customer-id}/service-subscriptions")
@PUT("/api/aai-business/v11/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}")
- Call<ResponseBody> createOrUpdateServiceType(@Path("global-customer-id") String customerId,@Path("service-type") String serviceType);
+ Call<ResponseBody> createOrUpdateServiceType(@Path("global-customer-id") String customerId,@Path("service-type") String serviceType,@Body RequestBody body);
@Headers({
"X-TransactionId: 7777",
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerService.java
index d75d101a..641aa8c5 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerService.java
@@ -157,12 +157,12 @@ public class DefaultCustomerService implements CustomerService {
}
@Override
- public JSONObject createOrUpdateServiceType(HttpServletRequest request,String serviceType){
+ public JSONObject createOrUpdateServiceType(HttpServletRequest request,String serviceType,String customerId){
JSONObject result = new JSONObject();
try {
logger.info("aai createOrUpdateServiceType is starting!");
RequestBody requestBody = extractBody(request);
- Response<ResponseBody> response = this.aaiService.createOrUpdateCustomer(serviceType,requestBody).execute();
+ Response<ResponseBody> response = this.aaiService.createOrUpdateServiceType(customerId,serviceType,requestBody).execute();
logger.info("aai createOrUpdateServiceType is finished!");
if(response.isSuccessful()){
result.put("status", "SUCCESS");