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;
}
Aggregations