summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAICustomerManager.java
blob: 6b8c55bf84f7f09106a27ae86c34fc16060ba849 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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());
        }
    }


}