Package org.uddi.api_v3

Examples of org.uddi.api_v3.RelatedBusinessesList


        }
       
      }
      if (subscriptionFilter.getFindRelatedBusinesses() != null) {
        FindRelatedBusinesses findRelatedBusiness = subscriptionFilter.getFindRelatedBusinesses();
        RelatedBusinessesList  relatedBusinessList = InquiryHelper.getRelatedBusinessesList(findRelatedBusiness, em, startPointDate, endPointDate);
        result.setRelatedBusinessesList(relatedBusinessList);
      }
      if (subscriptionFilter.getGetBindingDetail() != null) {
        GetBindingDetail getDetail = subscriptionFilter.getGetBindingDetail();
       
View Full Code Here


      // TODO: findQualifiers aren't really used for this call, except maybe for sorting.  Sorting must be done in Java due to the retrieval method used.  Right now
      // no sorting is performed.
      org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
      findQualifiers.mapApiFindQualifiers(body.getFindQualifiers());
     
      RelatedBusinessesList result = InquiryHelper.getRelatedBusinessesList(body, em);
     
      tx.commit();
      return result;
    } finally {
      if (tx.isActive()) {
View Full Code Here

  public static RelatedBusinessesList getRelatedBusinessesList(FindRelatedBusinesses body, EntityManager em) throws DispositionReportFaultMessage {
    return getRelatedBusinessesList(body, em, null, null);
  }
 
  public static RelatedBusinessesList getRelatedBusinessesList(FindRelatedBusinesses body, EntityManager em, Date modifiedAfter, Date modifiedBefore) throws DispositionReportFaultMessage {
    RelatedBusinessesList result = new RelatedBusinessesList();
    ListDescription listDesc = new ListDescription();
    result.setListDescription(listDesc);
   
    // Either one of the businessKey, fromKey or toKey will be passed.  This is considered the "focal" business to which related businesses must be
    // found.  Rather than use a query, it seems simpler to take advantage of the model's publisher assertion collections.
    org.uddi.api_v3.RelatedBusinessInfos relatedBusinessInfos = new org.uddi.api_v3.RelatedBusinessInfos();
    if (body.getBusinessKey() != null ) {
      InquiryHelper.getRelatedBusinesses(em, Direction.FROM_KEY, body.getBusinessKey(), body.getKeyedReference(), relatedBusinessInfos, modifiedAfter, modifiedBefore);
      InquiryHelper.getRelatedBusinesses(em, Direction.TO_KEY, body.getBusinessKey(), body.getKeyedReference(), relatedBusinessInfos, modifiedAfter, modifiedBefore);
    }
    else if (body.getFromKey() != null)
      InquiryHelper.getRelatedBusinesses(em, Direction.FROM_KEY, body.getFromKey(), body.getKeyedReference(), relatedBusinessInfos, modifiedAfter, modifiedBefore);
    else if (body.getToKey() != null)
      InquiryHelper.getRelatedBusinesses(em, Direction.TO_KEY, body.getToKey(), body.getKeyedReference(), relatedBusinessInfos, modifiedAfter, modifiedBefore);

    if (relatedBusinessInfos.getRelatedBusinessInfo().size() > 0) {
      // TODO: Do proper pagination!
      listDesc.setActualCount(relatedBusinessInfos.getRelatedBusinessInfo().size());
      listDesc.setIncludeCount(relatedBusinessInfos.getRelatedBusinessInfo().size());
      listDesc.setListHead(1);
     
      result.setRelatedBusinessInfos(relatedBusinessInfos);
    }
   
    return result;
  }
View Full Code Here

      // TODO: findQualifiers aren't really used for this call, except maybe for sorting.  Sorting must be done in Java due to the retrieval method used.  Right now
      // no sorting is performed.
      org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
      findQualifiers.mapApiFindQualifiers(body.getFindQualifiers());
     
      RelatedBusinessesList result = InquiryHelper.getRelatedBusinessesList(body, em);
     
      tx.commit();
      return result;
    } finally {
      if (tx.isActive()) {
View Full Code Here

        }
       
      }
      if (subscriptionFilter.getFindRelatedBusinesses() != null) {
        FindRelatedBusinesses findRelatedBusiness = subscriptionFilter.getFindRelatedBusinesses();
        RelatedBusinessesList  relatedBusinessList = InquiryHelper.getRelatedBusinessesList(findRelatedBusiness, em, startPointDate, endPointDate);
        result.setRelatedBusinessesList(relatedBusinessList);
      }
      if (subscriptionFilter.getGetBindingDetail() != null) {
        GetBindingDetail getDetail = subscriptionFilter.getGetBindingDetail();
       
View Full Code Here

  public static RelatedBusinessesList getRelatedBusinessesList(FindRelatedBusinesses body, EntityManager em) throws DispositionReportFaultMessage {
    return getRelatedBusinessesList(body, em, null, null);
  }
 
  public static RelatedBusinessesList getRelatedBusinessesList(FindRelatedBusinesses body, EntityManager em, Date modifiedAfter, Date modifiedBefore) throws DispositionReportFaultMessage {
    RelatedBusinessesList result = new RelatedBusinessesList();
    result.setBusinessKey(body.getBusinessKey());
    ListDescription listDesc = new ListDescription();
    result.setListDescription(listDesc);
   
    // Either one of the businessKey, fromKey or toKey will be passed.  This is considered the "focal" business to which related businesses must be
    // found.  Rather than use a query, it seems simpler to take advantage of the model's publisher assertion collections.
    org.uddi.api_v3.RelatedBusinessInfos relatedBusinessInfos = new org.uddi.api_v3.RelatedBusinessInfos();
    if (body.getBusinessKey() != null ) {
      InquiryHelper.getRelatedBusinesses(em, Direction.FROM_KEY, body.getBusinessKey(), body.getKeyedReference(), relatedBusinessInfos, modifiedAfter, modifiedBefore);
      InquiryHelper.getRelatedBusinesses(em, Direction.TO_KEY, body.getBusinessKey(), body.getKeyedReference(), relatedBusinessInfos, modifiedAfter, modifiedBefore);
    }
    else if (body.getFromKey() != null)
      InquiryHelper.getRelatedBusinesses(em, Direction.FROM_KEY, body.getFromKey(), body.getKeyedReference(), relatedBusinessInfos, modifiedAfter, modifiedBefore);
    else if (body.getToKey() != null)
      InquiryHelper.getRelatedBusinesses(em, Direction.TO_KEY, body.getToKey(), body.getKeyedReference(), relatedBusinessInfos, modifiedAfter, modifiedBefore);

    if (relatedBusinessInfos.getRelatedBusinessInfo().size() > 0) {
      // TODO: Do proper pagination!
      listDesc.setActualCount(relatedBusinessInfos.getRelatedBusinessInfo().size());
      listDesc.setIncludeCount(relatedBusinessInfos.getRelatedBusinessInfo().size());
      listDesc.setListHead(1);
     
      result.setRelatedBusinessInfos(relatedBusinessInfos);
    }
   
    return result;
  }
View Full Code Here

   
    BindingTemplate bindingTemplate=null;
    log.info("Registering bindingTemplate with key " + binding.getBindingKey());
    try {
      String authToken = getAuthToken(node.getSecurityUrl());
      SaveBinding saveBinding = new SaveBinding();
      saveBinding.setAuthInfo(authToken);
      saveBinding.getBindingTemplate().add(binding);
      BindingDetail bindingDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveBinding(saveBinding);
      bindingTemplate = bindingDetail.getBindingTemplate().get(0);
    } catch (Exception e) {
      log.error("Unable to register template binding " + bindingTemplate.getBindingKey()
          + " ." + e.getMessage(),e);
View Full Code Here

      org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(serviceXML, "org.uddi.api_v3");
      String serviceName = bsIn.getName().get(0).getValue();
      String bindingKey = bsIn.getBindingTemplates().getBindingTemplate().get(0).getBindingKey();
      for (int i=0; i<numberOfCopies; i++) {
          // save the entity
        SaveService ss = new SaveService();
        ss.setAuthInfo(authInfo);
        bsIn.getName().get(0).setValue(serviceName + "-" + i);
       
        bsIn.setServiceKey(serviceKey + "-" + i);
        bsIn.getBindingTemplates().getBindingTemplate().get(0).setBindingKey(bindingKey + "-" + i);
        ss.getBusinessService().add(bsIn);
        publication.saveService(ss);
        logger.debug("Add service with key " + bsIn.getServiceKey());
      }
    }
    catch(Exception e) {
View Full Code Here

 
 
  public void saveService(String authInfo, String serviceXML, String serviceKey) {
    try {
      // First save the entity
      SaveService ss = new SaveService();
      ss.setAuthInfo(authInfo);
     
      org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(serviceXML, "org.uddi.api_v3");
      ss.getBusinessService().add(bsIn);
      publication.saveService(ss);
     
      // Now get the entity and check the values
      GetServiceDetail gs = new GetServiceDetail();
      gs.getServiceKey().add(serviceKey);
View Full Code Here

  }
 
  public void saveService2(String authInfo, String serviceKey, String serviceXML2,  String serviceKey2) {
    try {
      // First save the entity
      SaveService ss = new SaveService();
      ss.setAuthInfo(authInfo);
     
      org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(serviceXML2, "org.uddi.api_v3");
      ss.getBusinessService().add(bsIn);
      publication.saveService(ss);
     
      // Now get the entity and check the values
      GetServiceDetail gs = new GetServiceDetail();
      gs.getServiceKey().add(serviceKey);
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.RelatedBusinessesList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.