@Override public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage { if (items == null) { return; } //cant use the following //wsdlDeployment for (int i = 0; i < items.size(); i++) { if (items.get(i).getBusinessServices() != null) { validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ")."); } } }
@Override public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage { if (items == null) { return; } //cant use the following //wsdlDeployment for (int i = 0; i < items.size(); i++) { if (items.get(i).getBusinessServices() != null) { validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ")."); } } }
public void validateBusinessServices(EntityManager em, org.uddi.api_v3.BusinessServices businessServices, org.uddi.api_v3.BusinessEntity parent, Configuration config, UddiEntityPublisher publisher) throws DispositionReportFaultMessage { // Business services is optional if (businessServices == null) { return; } List<org.uddi.api_v3.BusinessService> businessServiceList = businessServices.getBusinessService(); if (businessServiceList == null || businessServiceList.size() == 0) { throw new ValueNotAllowedException(new ErrorMessage("errors.businessservices.NoInput")); } for (org.uddi.api_v3.BusinessService businessService : businessServiceList) { validateBusinessService(em, businessService, parent, config, publisher); } }
public void validateBusinessServices(EntityManager em, org.uddi.api_v3.BusinessServices businessServices, org.uddi.api_v3.BusinessEntity parent, Configuration config, UddiEntityPublisher publisher) throws DispositionReportFaultMessage { // Business services is optional if (businessServices == null) { return; } List<org.uddi.api_v3.BusinessService> businessServiceList = businessServices.getBusinessService(); if (businessServiceList == null || businessServiceList.size() == 0) { throw new ValueNotAllowedException(new ErrorMessage("errors.businessservices.NoInput")); } for (org.uddi.api_v3.BusinessService businessService : businessServiceList) { validateBusinessService(em, businessService, parent, config, publisher); } }
private List<String> validateValuesBusinessEntity(List<BusinessEntity> items) { List<String> ret = new ArrayList<String>(); if (items == null) { return ret; } for (int i = 0; i < items.size(); i++) { if (items.get(i).getCategoryBag() != null) { ret.addAll(validateValuesKeyRef(items.get(i).getCategoryBag().getKeyedReference())); ret.addAll(validateValuesKeyRefGrp(items.get(i).getCategoryBag().getKeyedReferenceGroup())); } if (items.get(i).getIdentifierBag() != null) { ret.addAll(validateValuesKeyRef(items.get(i).getIdentifierBag().getKeyedReference())); } if (items.get(i).getBusinessServices() != null) { ret.addAll(validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService())); } } return ret; }
private List<String> validateValuesBusinessEntity(List<BusinessEntity> items) { List<String> ret = new ArrayList<String>(); if (items == null) { return ret; } for (int i = 0; i < items.size(); i++) { if (items.get(i).getCategoryBag() != null) { ret.addAll(validateValuesKeyRef(items.get(i).getCategoryBag().getKeyedReference())); ret.addAll(validateValuesKeyRefGrp(items.get(i).getCategoryBag().getKeyedReferenceGroup())); } if (items.get(i).getIdentifierBag() != null) { ret.addAll(validateValuesKeyRef(items.get(i).getIdentifierBag().getKeyedReference())); } if (items.get(i).getBusinessServices() != null) { ret.addAll(validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService())); } } return ret; }
public BusinessServices registerBusinessServices(Definition wsdlDefinition) throws RemoteException, ConfigurationException, TransportException, WSDLException, MalformedURLException { BusinessServices businessServices = new BusinessServices(); for (Object serviceName : wsdlDefinition.getAllServices().keySet()) { QName serviceQName = (QName) serviceName; Service service = wsdlDefinition.getService(serviceQName); BusinessService businessService = null; //add service URL serviceUrl = null; if (service.getPorts() != null && service.getPorts().size() > 0) { for (Object portName : service.getPorts().keySet()) { businessService = registerBusinessService(serviceQName, (String) portName, serviceUrl, wsdlDefinition).getBusinessService(); } } if (businessService != null) { businessServices.getBusinessService().add(businessService); } } return businessServices; }
@Override public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage { if (items == null) { return; } for (int i = 0; i < items.size(); i++) { if (items.get(i).getCategoryBag() != null) { validatedValuesKeyRef(items.get(i).getCategoryBag().getKeyedReference(), "businessEntity(" + i + ").categoryBag."); validatedValuesKeyRefGrp(items.get(i).getCategoryBag().getKeyedReferenceGroup(), "businessEntity(" + i + ").categoryBagGroup."); } if (items.get(i).getIdentifierBag() != null) { validatedValuesKeyRef(items.get(i).getIdentifierBag().getKeyedReference(), "businessEntity(" + i + ").identifierBag."); } if (items.get(i).getBusinessServices() != null) { validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ")."); } } }
@Override public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage { if (items == null) { return; } for (int i = 0; i < items.size(); i++) { if (items.get(i).getCategoryBag() != null) { validatedValuesKeyRef(items.get(i).getCategoryBag().getKeyedReference(), "businessEntity(" + i + ").categoryBag."); validatedValuesKeyRefGrp(items.get(i).getCategoryBag().getKeyedReferenceGroup(), "businessEntity(" + i + ").categoryBagGroup."); } if (items.get(i).getIdentifierBag() != null) { validatedValuesKeyRef(items.get(i).getIdentifierBag().getKeyedReference(), "businessEntity(" + i + ").identifierBag."); } if (items.get(i).getBusinessServices() != null) { validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ")."); } } }
public void checkNumberOfServices(String businessKey, int expectedServices) { try { GetBusinessDetail gb = new GetBusinessDetail(); gb.getBusinessKey().add(businessKey); BusinessDetail bd; bd = inquiry.getBusinessDetail(gb); List<BusinessEntity> beOutList = bd.getBusinessEntity(); BusinessEntity beOut = beOutList.get(0); if (expectedServices > 0) { assertEquals(expectedServices, beOut.getBusinessServices().getBusinessService().size()); } else { Assert.assertNull(beOut.getBusinessServices()); } } catch (RemoteException e) { logger.error(e.getMessage(), e); Assert.fail("No exception should be thrown " + e.getMessage()); } }
private List<String> GetBindingKeysCheckedTModelKeyedReferenceBE(Map<String, TModel> cache, List<BusinessEntity> obj) { List<String> ret = new ArrayList<String>(); if (obj == null) { return ret; } for (BusinessEntity bt : obj) { if (bt.getCategoryBag() != null) { for (int i = 0; i < bt.getCategoryBag().getKeyedReference().size(); i++) { ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getCategoryBag().getKeyedReference().get(i))); } } if (bt.getIdentifierBag() != null) { for (int i = 0; i < bt.getIdentifierBag().getKeyedReference().size(); i++) { ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getIdentifierBag().getKeyedReference().get(i))); } } if (bt.getBusinessServices() != null) { ret.addAll(GetBindingKeysCheckedTModelKeyedReferenceBS(cache, bt.getBusinessServices().getBusinessService())); } } return ret; }
@Override public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage { if (items == null) { return; } for (int i = 0; i < items.size(); i++) { if (items.get(i).getCategoryBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getMyKey(), "business"); AbstractSimpleValidator.validateKeyNotPresentKeyRefGrp(items.get(i).getCategoryBag().getKeyedReferenceGroup(), getMyKey(), "business"); } if (items.get(i).getIdentifierBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getMyKey(), "business"); } if (items.get(i).getBusinessServices() != null) { validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ")."); } } }
@Override public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage { if (items == null) { return; } for (int i = 0; i < items.size(); i++) { if (items.get(i).getCategoryBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getKey(), "business"); AbstractSimpleValidator.validateKeyNotPresentKeyRefGrp(items.get(i).getCategoryBag().getKeyedReferenceGroup(), getKey(), "business"); } if (items.get(i).getIdentifierBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getKey(), "business"); } if (items.get(i).getBusinessServices() != null) { validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ")."); } } }
@Override public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage { if (items == null) { return; } for (int i = 0; i < items.size(); i++) { if (items.get(i).getCategoryBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getMyKey(), "business"); AbstractSimpleValidator.validateKeyNotPresentKeyRefGrp(items.get(i).getCategoryBag().getKeyedReferenceGroup(), getMyKey(), "business"); } if (items.get(i).getIdentifierBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getMyKey(), "business"); } if (items.get(i).getBusinessServices() != null) { validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ")."); } } }
private List<String> GetBindingKeysCheckedTModelKeyedReferenceBE(Map<String, TModel> cache, List<BusinessEntity> obj) { List<String> ret = new ArrayList<String>(); if (obj == null) { return ret; } for (BusinessEntity bt : obj) { if (bt.getCategoryBag() != null) { for (int i = 0; i < bt.getCategoryBag().getKeyedReference().size(); i++) { ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getCategoryBag().getKeyedReference().get(i))); } } if (bt.getIdentifierBag() != null) { for (int i = 0; i < bt.getIdentifierBag().getKeyedReference().size(); i++) { ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getIdentifierBag().getKeyedReference().get(i))); } } if (bt.getBusinessServices() != null) { ret.addAll(GetBindingKeysCheckedTModelKeyedReferenceBS(cache, bt.getBusinessServices().getBusinessService())); } } return ret; }
@Override public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage { if (items == null) { return; } for (int i = 0; i < items.size(); i++) { if (items.get(i).getCategoryBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getMyKey(), "business"); AbstractSimpleValidator.validateKeyNotPresentKeyRefGrp(items.get(i).getCategoryBag().getKeyedReferenceGroup(), getMyKey(), "business"); } if (items.get(i).getIdentifierBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getMyKey(), "business"); } if (items.get(i).getBusinessServices() != null) { validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ")."); } } }
@Override public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage { if (items == null) { return; } for (int i = 0; i < items.size(); i++) { if (items.get(i).getCategoryBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getKey(), "business"); AbstractSimpleValidator.validateKeyNotPresentKeyRefGrp(items.get(i).getCategoryBag().getKeyedReferenceGroup(), getKey(), "business"); } if (items.get(i).getIdentifierBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getKey(), "business"); } if (items.get(i).getBusinessServices() != null) { validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ")."); } } }
@Override public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage { if (items == null) { return; } for (int i = 0; i < items.size(); i++) { if (items.get(i).getCategoryBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getMyKey(), "business"); AbstractSimpleValidator.validateKeyNotPresentKeyRefGrp(items.get(i).getCategoryBag().getKeyedReferenceGroup(), getMyKey(), "business"); } if (items.get(i).getIdentifierBag() != null) { AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), getMyKey(), "business"); } if (items.get(i).getBusinessServices() != null) { validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ")."); } } }
public static org.uddi.api_v2.BusinessEntity MapBusiness(org.uddi.api_v3.BusinessEntity be, String operator) { if (be == null) { return null; } BusinessEntity item = new org.uddi.api_v2.BusinessEntity(); item.setBusinessKey(be.getBusinessKey()); if (item.getBusinessKey()==null) item.setBusinessKey(""); item.setCategoryBag(MapCategoryBag(be.getCategoryBag())); item.setContacts(MapContacts(be.getContacts())); item.setDiscoveryURLs(MapDiscoveryURLs(be.getDiscoveryURLs())); item.setIdentifierBag(MapIdentBag(be.getIdentifierBag())); item.setOperator(operator); item.getDescription().addAll(MapDescription(be.getDescription())); item.getName().addAll(MapName(be.getName())); if (be.getBusinessServices() != null && !be.getBusinessServices().getBusinessService().isEmpty()) { item.setBusinessServices(new BusinessServices()); item.getBusinessServices().getBusinessService().addAll(MapService(be.getBusinessServices().getBusinessService())); } return item; }
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; }