diff options
Diffstat (limited to 'usecaseui-portal/src')
-rw-r--r-- | usecaseui-portal/src/app/core/services/managemencs.service.ts | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/usecaseui-portal/src/app/core/services/managemencs.service.ts b/usecaseui-portal/src/app/core/services/managemencs.service.ts index a28885d8..da43b8f5 100644 --- a/usecaseui-portal/src/app/core/services/managemencs.service.ts +++ b/usecaseui-portal/src/app/core/services/managemencs.service.ts @@ -10,32 +10,46 @@ export class ManagemencsService { constructor(private http: HttpClient) { } baseUrl = baseUrl.baseUrl; - - - /* line up */ url = { + // The following APIs are optimizable customers: this.baseUrl + "/uui-lcm/customers", /* get */ - serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions", /* get */ CustomersPir: this.baseUrl + "/uui-lcm/serviceNumByCustomer", /* get */ + deleteCustomer: this.baseUrl + "/uui-lcm/customers?customerId=*_*&resourceVersion=*+*", /* delete */ + // The following APIs are not optimizable + serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions", /* get */ CustomersColumn: this.baseUrl + "/uui-lcm/serviceNumByServiceType/" + "*_*", /* get */ createCustomer: this.baseUrl + "/uui-lcm/customers/", /* put */ createServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*", /* put */ getCustomerresourceVersion: this.baseUrl + "/uui-lcm/customers/*_*", /* put */ - deleteCustomer: this.baseUrl + "/uui-lcm/customers?customerId=*_*&resourceVersion=*+*", getServiceTypeResourceVersion: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*", deleteServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*?resourceVersion=*@* ", }; + //The following APIs are optimizable ---------------------------------- // Get all customers getAllCustomers() { return this.http.get<any>(this.url.customers); } + // create New Customer + createCustomer(customer, createParams) { + let url = this.url.createCustomer + customer; + return this.http.put(url, createParams); + } + // delete SelectCustomer + deleteSelectCustomer(params) { + let customerId = params.customerId, + version = params.version; + let url = this.url.deleteCustomer.replace("*_*", customerId).replace("*+*", version); + return this.http.delete(url); + } + + //The following APIs are not optimizable --------------------------------- + // get all servicetype getServiceTypes(customer) { let url = this.url.serviceType.replace("*_*", customer.id); - console.log(url) return this.http.get<any>(url); } // get Customer Pir @@ -47,40 +61,26 @@ export class ManagemencsService { let url = this.url.CustomersColumn.replace("*_*", customer.id); return this.http.get<any>(url); } - // create New Customer - createCustomer(customer, createParams) { - let url = this.url.createCustomer + customer; - // return this.http.get(url, createParams);//location - return this.http.put(url, createParams);//online - } - + // create ServiceType createServiceType(createParams) { let customerId = createParams.customer.id, ServiceType = createParams.ServiceType; let url = this.url.createServiceType.replace("*_*", customerId).replace("*+*", ServiceType); - // return this.http.get(url,createParams);//location return this.http.put(url, createParams);//online } - + // Get delete Customer Version getdeleteCustomerVersion(thisdeleteCustomer) { let url = this.url.getCustomerresourceVersion.replace("*_*", thisdeleteCustomer.id); return this.http.get(url); } - - deleteSelectCustomer(params) { - let customerId = params.customerId, - version = params.version; - let url = this.url.deleteCustomer.replace("*_*", customerId).replace("*+*", version); - return this.http.delete(url); - } - + // Get delete ServiceType Version getdeleteServiceTypeVersion(params) { let customerId = params.customerId.id, ServiceType = params.ServiceType; let url = this.url.getServiceTypeResourceVersion.replace("*_*", customerId).replace("*+*", ServiceType); return this.http.get(url); } - + // delete Select ServiceType deleteSelectServiceType(params) { let customerId = params.customerId.id, ServiceType = params.ServiceType, |