public static void mapBusinessServices(List<org.apache.juddi.model.BusinessService> modelBusinessServiceList, List<org.apache.juddi.model.ServiceProjection> modelServiceProjectionList, org.uddi.api_v3.BusinessServices apiBusinessServices, org.uddi.api_v3.BusinessEntity apiBusinessEntity) throws DispositionReportFaultMessage { if (apiBusinessServices == null) { apiBusinessServices = new org.uddi.api_v3.BusinessServices(); } List<org.uddi.api_v3.BusinessService> apiBusinessServiceList = apiBusinessServices.getBusinessService(); apiBusinessServiceList.clear(); if (modelBusinessServiceList != null && modelBusinessServiceList.size() > 0) { for (org.apache.juddi.model.BusinessService modelBusinessService : modelBusinessServiceList) { org.uddi.api_v3.BusinessService apiBusinessService = new org.uddi.api_v3.BusinessService(); mapBusinessService(modelBusinessService, apiBusinessService); apiBusinessServiceList.add(apiBusinessService); } } if (modelServiceProjectionList != null && modelServiceProjectionList.size() > 0) { for (org.apache.juddi.model.ServiceProjection modelServiceProjection : modelServiceProjectionList) { org.uddi.api_v3.BusinessService apiBusinessService = new org.uddi.api_v3.BusinessService(); mapBusinessService(modelServiceProjection.getBusinessService(), apiBusinessService); apiBusinessServiceList.add(apiBusinessService); } } if (apiBusinessServiceList.size() > 0) { apiBusinessEntity.setBusinessServices(apiBusinessServices); } }
public static void mapBusinessServices(List<org.apache.juddi.model.BusinessService> modelBusinessServiceList, List<org.apache.juddi.model.ServiceProjection> modelServiceProjectionList, org.uddi.api_v3.BusinessServices apiBusinessServices, org.uddi.api_v3.BusinessEntity apiBusinessEntity) throws DispositionReportFaultMessage { if (apiBusinessServices == null) { apiBusinessServices = new org.uddi.api_v3.BusinessServices(); } List<org.uddi.api_v3.BusinessService> apiBusinessServiceList = apiBusinessServices.getBusinessService(); apiBusinessServiceList.clear(); if (modelBusinessServiceList != null && modelBusinessServiceList.size() > 0) { for (org.apache.juddi.model.BusinessService modelBusinessService : modelBusinessServiceList) { org.uddi.api_v3.BusinessService apiBusinessService = new org.uddi.api_v3.BusinessService(); mapBusinessService(modelBusinessService, apiBusinessService); apiBusinessServiceList.add(apiBusinessService); } } if (modelServiceProjectionList != null && modelServiceProjectionList.size() > 0) { for (org.apache.juddi.model.ServiceProjection modelServiceProjection : modelServiceProjectionList) { org.uddi.api_v3.BusinessService apiBusinessService = new org.uddi.api_v3.BusinessService(); mapBusinessService(modelServiceProjection.getBusinessService(), apiBusinessService); apiBusinessServiceList.add(apiBusinessService); } } if (apiBusinessServiceList.size() > 0) { apiBusinessEntity.setBusinessServices(apiBusinessServices); } }
/** * Copies the BusinessInformation from one UDDI to another UDDI. Note that no services are being * copied over by this service. Use xRegisterService to copy over services. */ public void xRegisterBusiness() { BusinessEntity businessEntity; try { businessEntity = fromClerk.getBusinessDetail(entityKey,fromClerk.getUDDINode().getApiNode()); log.info("xregister business " + businessEntity.getName().get(0).getValue() + " + from " + fromClerk.getName() + " to " + toClerk.getName() + "."); //not bringing over the services. They need to be explicitly copied using xRegisterService. businessEntity.setBusinessServices(null); toClerk.register(businessEntity,toClerk.getUDDINode().getApiNode()); } catch (Exception e) { log.error("Could not " + toString() + ". " + e.getMessage() + " " + e.getCause(),e); } }
biz.setContacts(cts); biz.setBusinessServices(bss);
biz.setContacts(cts); biz.setBusinessServices(bss);
public static org.uddi.api_v3.BusinessEntity MapBusiness(org.uddi.api_v2.BusinessEntity be) { if (be == null) { return null; } BusinessEntity item = new org.uddi.api_v3.BusinessEntity(); item.setBusinessKey(be.getBusinessKey()); item.getName().addAll(MapName(be.getName())); item.setCategoryBag(MapCategoryBag(be.getCategoryBag())); item.setDiscoveryURLs(MapDiscoveryURLs(be.getDiscoveryURLs())); item.getDescription().addAll(MapDescription(be.getDescription())); item.setContacts(MapContacts(be.getContacts())); item.setIdentifierBag(MapIdentBag(be.getIdentifierBag())); if (be.getBusinessServices() != null && !be.getBusinessServices().getBusinessService().isEmpty()) { item.setBusinessServices(new BusinessServices()); item.getBusinessServices().getBusinessService().addAll(MapService(be.getBusinessServices().getBusinessService())); } return item; }