summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAICustomerManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAICustomerManager.java')
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAICustomerManager.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAICustomerManager.java b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAICustomerManager.java
new file mode 100644
index 0000000..6b8c55b
--- /dev/null
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAICustomerManager.java
@@ -0,0 +1,29 @@
+package org.onap.nbi.apis.serviceorder.workflow;
+
+import org.onap.nbi.apis.serviceorder.MultiClient;
+import org.onap.nbi.apis.serviceorder.model.orchestrator.ServiceOrderInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class CreateAAICustomerManager {
+
+
+ @Autowired
+ private MultiClient serviceOrderConsumerService;
+
+
+ public void createAAICustomer(ServiceOrderInfo serviceOrderInfo) {
+
+
+ if (serviceOrderInfo.isUseServiceOrderCustomer() && serviceOrderInfo.isAllItemsInAdd()
+ && !serviceOrderConsumerService
+ .isCustomerPresentInAAI(serviceOrderInfo.getSubscriberInfo().getGlobalSubscriberId())) {
+ serviceOrderConsumerService.putCustomer(serviceOrderInfo.getSubscriberInfo());
+ }
+ }
+
+
+}
+
+