}
public static Service getService(BusinessService businessService, LifeCycleManager lifeCycleManager)
throws JAXRException
{
Service serve = new ServiceImpl(lifeCycleManager);
String keystr = businessService.getServiceKey();
if (keystr != null)
{
serve.setKey(lifeCycleManager.createKey(keystr));
}
Name n = null;
if (businessService.getName().size()>0) n = businessService.getName().get(0);
if (n != null) {
String name = n.getValue();
serve.setName(lifeCycleManager.createInternationalString(getLocale(n.getLang()), name));
}
Description desc =null;
if (businessService.getDescription().size()>0) desc = businessService.getDescription().get(0);
if (desc != null ) {
serve.setDescription(lifeCycleManager.createInternationalString(getLocale(desc.getLang()), desc.getValue()));
}
//Populate the ServiceBindings for this Service
BindingTemplates bts = businessService.getBindingTemplates();
List<BindingTemplate> bindingTemplateList = bts.getBindingTemplate();
for (BindingTemplate bindingTemplate : bindingTemplateList) {
serve.addServiceBinding(getServiceBinding(bindingTemplate, lifeCycleManager));
}
serve.addClassifications(getClassifications(businessService.getCategoryBag(), lifeCycleManager));
return serve;
}