Package org.uddi.api_v2

Examples of org.uddi.api_v2.RelatedBusinessesList


  }
 
  public void findRelatedBusiness_sortByName(boolean isOneSided) {
    try {
      FindRelatedBusinesses body = (FindRelatedBusinesses)EntityCreator.buildFromDoc(FIND_RELATED_BUSINESS_SORT_BY_NAME_XML, "org.uddi.api_v3");
      RelatedBusinessesList result = inquiry.findRelatedBusinesses(body);
      if (result == null)
        Assert.fail("Null result from find related business operation");
      RelatedBusinessInfos bInfos = result.getRelatedBusinessInfos();
   
      //both parties need to register the assertion for it to be live.
      if (isOneSided) {
        Assert.assertNull(bInfos);
      } else {
View Full Code Here


      TransportException, ConfigurationException  {
    FindRelatedBusinesses findRelatedBusinesses = new FindRelatedBusinesses();
    findRelatedBusinesses.setBusinessKey(businessKey);
    findRelatedBusinesses.setAuthInfo(node.getSecurityUrl());
    try {
      RelatedBusinessesList rbl = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).findRelatedBusinesses(findRelatedBusinesses);
      return rbl;
    } catch (DispositionReportFaultMessage dr) {
      DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
      checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
    } catch (SOAPFaultException sfe) {
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

        }
       
      }
      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();
                        long procTime = System.nanoTime() - startTime;
                        serviceCounter.update(InquiryQuery.FIND_RELATEDBUSINESSES, QueryStatus.SUCCESS, procTime);                     
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);
        result.setBusinessKey(body.getFromKey());
    } else if (body.getToKey() != null) {
      InquiryHelper.getRelatedBusinesses(em, Direction.TO_KEY, body.getToKey(), body.getKeyedReference(), relatedBusinessInfos, modifiedAfter, modifiedBefore);
            result.setBusinessKey(body.getToKey());
    }
    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

  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

      // 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 void findRelatedBusiness_sortByName(boolean isOneSided) {
    try {
      FindRelatedBusinesses body = (FindRelatedBusinesses)EntityCreator.buildFromDoc(FIND_RELATED_BUSINESS_SORT_BY_NAME_XML, "org.uddi.api_v3");
      RelatedBusinessesList result = inquiry.findRelatedBusinesses(body);
      if (result == null)
        Assert.fail("Null result from find related business operation");
      RelatedBusinessInfos bInfos = result.getRelatedBusinessInfos();
   
      //both parties need to register the assertion for it to be live.
      if (isOneSided) {
        Assert.assertNull(bInfos);
      } else {
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.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.