Search in sources :

Example 1 with SubscriberInfo

use of org.onap.so.client.sniro.beans.SubscriberInfo in project so by onap.

the class SniroHomingV2 method buildPlacementInfo.

/**
 * Builds initial section of placement info for the homing/licensing request
 */
private PlacementInfo buildPlacementInfo(Customer customer, RequestParameters requestParams) {
    PlacementInfo placementInfo = new PlacementInfo();
    if (customer != null) {
        logger.debug("Adding subscriber to placement information");
        SubscriberInfo subscriber = new SubscriberInfo();
        subscriber.setGlobalSubscriberId(customer.getGlobalCustomerId());
        subscriber.setSubscriberName(customer.getSubscriberName());
        subscriber.setSubscriberCommonSiteId(customer.getSubscriberCommonSiteId());
        placementInfo.setSubscriberInfo(subscriber);
        if (requestParams != null) {
            logger.debug("Adding request parameters to placement information");
            placementInfo.setRequestParameters(requestParams.toJsonString());
        }
    } else {
        throw new BpmnError(UNPROCESSABLE, SERVICE_MISSING_DATA + "customer");
    }
    return placementInfo;
}
Also used : PlacementInfo(org.onap.so.client.sniro.beans.PlacementInfo) SubscriberInfo(org.onap.so.client.sniro.beans.SubscriberInfo) BpmnError(org.camunda.bpm.engine.delegate.BpmnError)

Aggregations

BpmnError (org.camunda.bpm.engine.delegate.BpmnError)1 PlacementInfo (org.onap.so.client.sniro.beans.PlacementInfo)1 SubscriberInfo (org.onap.so.client.sniro.beans.SubscriberInfo)1