Package org.uddi.api_v2

Examples of org.uddi.api_v2.FindBinding


                return r;
               
        }
       
        public static TModelList MapTModelListElement(org.uddi.api_v3.TModelList findTModel, String operator) {
                TModelList r = new TModelList();
                r.setGeneric(VERSION);
                r.setOperator(operator);
                r.setTModelInfos(new TModelInfos());
                if (findTModel == null) {
                        r.setTruncated(Truncated.FALSE);
                        return r;
                }
               
                if (findTModel.isTruncated() != null && findTModel.isTruncated()) {
                        r.setTruncated(Truncated.TRUE);
                } else {
                        r.setTruncated(Truncated.FALSE);
                }
                if (findTModel.getTModelInfos() != null) {
                       
                        r.getTModelInfos().getTModelInfo().addAll(MapTModelInfo(findTModel.getTModelInfos().getTModelInfo()));
                }
               
                return r;
        }
View Full Code Here


      Assert.fail("No exception should be thrown.");
    }
  }
  public void findBinding() {
    try {
      FindBinding body = (FindBinding)EntityCreator.buildFromDoc(FIND_BINDING_XML, "org.uddi.api_v3");
      BindingDetail result = inquiry.findBinding(body);
      if (result == null)
        Assert.fail("Null result from find binding operation");
      List<BindingTemplate> btList = result.getBindingTemplate();
      if (btList == null || btList.size() == 0)
View Full Code Here

            resultsKeyBag.getBindingKey().add(key);
         
          result.getKeyBag().add(resultsKeyBag);
        }
        else {
          FindBinding fb = subscriptionFilter.getFindBinding();
          org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
          findQualifiers.mapApiFindQualifiers(fb.getFindQualifiers());
         
          // To do subscription "chunking", the listHead and maxRows are nulled which will set them to system default.  User settings for
          // these values don't make sense with the "chunking" feature.
          fb.setListHead(null);
          fb.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          BindingDetail bindingDetail = InquiryHelper.getBindingDetailFromKeys(fb, findQualifiers, em, currentMatchingKeys,
                                             startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
             
          // Upon exiting above function, if more results are to be had, the subscriptionStartIndex will contain the latest value (or null
          // if no more results)
          chunkData = subscriptionStartIndex.value;
         
          result.setBindingDetail(bindingDetail);
        }
      }
      if (subscriptionFilter.getFindBusiness() != null) {
        //Get the current matching keys
        List<?> currentMatchingKeys = getSubscriptionMatches(subscriptionFilter, em);
 
        List<String> missingKeys = getMissingKeys(currentMatchingKeys, modelSubscription.getSubscriptionMatches());
        if (missingKeys != null && missingKeys.size() > 0) {
          KeyBag missingKeyBag = new KeyBag();
          missingKeyBag.setDeleted(true);
          for (String key : missingKeys)
            missingKeyBag.getBusinessKey().add(key);
 
          result.getKeyBag().add(missingKeyBag);
        }
       
        // Re-setting the subscription matches to the new matching key collection
        //modelSubscription.getSubscriptionMatches().clear();
        //for (Object key : currentMatchingKeys) {
        //  SubscriptionMatch subMatch = new SubscriptionMatch(modelSubscription, (String)key);
        //  modelSubscription.getSubscriptionMatches().add(subMatch);
        //}
       
        // Now, finding the necessary entities, within the coverage period limits
        if (modelSubscription.isBrief()) {
          KeyBag resultsKeyBag = new KeyBag();
          for (String key : (List<String>)currentMatchingKeys)
            resultsKeyBag.getBusinessKey().add(key);
         
          result.getKeyBag().add(resultsKeyBag);
        }
        else {
          FindBusiness fb = subscriptionFilter.getFindBusiness();
          org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
          findQualifiers.mapApiFindQualifiers(fb.getFindQualifiers());
         
          // To do subscription "chunking", the listHead and maxRows are nulled which will set them to system default.  User settings for
          // these values don't make sense with the "chunking" feature.
          fb.setListHead(null);
          fb.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          BusinessList businessList = InquiryHelper.getBusinessListFromKeys(fb, findQualifiers, em, currentMatchingKeys,
                                            startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
View Full Code Here

            resultsKeyBag.getBindingKey().add(key);
         
          result.getKeyBag().add(resultsKeyBag);
        }
        else {
          FindBinding fb = subscriptionFilter.getFindBinding();
          org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
          findQualifiers.mapApiFindQualifiers(fb.getFindQualifiers());
         
          // To do subscription "chunking", the listHead and maxRows are nulled which will set them to system default.  User settings for
          // these values don't make sense with the "chunking" feature.
          fb.setListHead(null);
          fb.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          BindingDetail bindingDetail = InquiryHelper.getBindingDetailFromKeys(fb, findQualifiers, em, currentMatchingKeys,
                                             startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
             
          // Upon exiting above function, if more results are to be had, the subscriptionStartIndex will contain the latest value (or null
          // if no more results)
          chunkData = subscriptionStartIndex.value;
         
          result.setBindingDetail(bindingDetail);
        }
      }
      if (subscriptionFilter.getFindBusiness() != null) {
        //Get the current matching keys
        List<?> currentMatchingKeys = getSubscriptionMatches(subscriptionFilter, em);
 
        List<String> missingKeys = getMissingKeys(currentMatchingKeys, modelSubscription.getSubscriptionMatches());
        if (missingKeys != null && missingKeys.size() > 0) {
          KeyBag missingKeyBag = new KeyBag();
          missingKeyBag.setDeleted(true);
          for (String key : missingKeys)
            missingKeyBag.getBusinessKey().add(key);
 
          result.getKeyBag().add(missingKeyBag);
        }
       
        // Re-setting the subscription matches to the new matching key collection
        //modelSubscription.getSubscriptionMatches().clear();
        //for (Object key : currentMatchingKeys) {
        //  SubscriptionMatch subMatch = new SubscriptionMatch(modelSubscription, (String)key);
        //  modelSubscription.getSubscriptionMatches().add(subMatch);
        //}
       
        // Now, finding the necessary entities, within the coverage period limits
        if (modelSubscription.isBrief()) {
          KeyBag resultsKeyBag = new KeyBag();
          for (String key : (List<String>)currentMatchingKeys)
            resultsKeyBag.getBusinessKey().add(key);
         
          result.getKeyBag().add(resultsKeyBag);
        }
        else {
          FindBusiness fb = subscriptionFilter.getFindBusiness();
          org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
          findQualifiers.mapApiFindQualifiers(fb.getFindQualifiers());
         
          // To do subscription "chunking", the listHead and maxRows are nulled which will set them to system default.  User settings for
          // these values don't make sense with the "chunking" feature.
          fb.setListHead(null);
          fb.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          BusinessList businessList = InquiryHelper.getBusinessListFromKeys(fb, findQualifiers, em, currentMatchingKeys,
                                            startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
View Full Code Here

      Assert.fail("No exception should be thrown.");
    }
  }
  public void findBinding(String findQualifier) {
    try {
      FindBinding body = (FindBinding)EntityCreator.buildFromDoc(FIND_BINDING_XML, "org.uddi.api_v3");
      if (findQualifier!=null) body.getFindQualifiers().getFindQualifier().add(findQualifier);
      BindingDetail result = inquiry.findBinding(body);
      if (result == null)
        Assert.fail("Null result from find binding operation");
      List<BindingTemplate> btList = result.getBindingTemplate();
      if (btList == null || btList.size() == 0)
View Full Code Here

    }

    public static String getInquiry(String method) {
        StringWriter sw = new StringWriter();
        if (method.equalsIgnoreCase("findBinding")) {
            JAXB.marshal(new FindBinding(), sw);
        }
        if (method.equalsIgnoreCase("findBusiness")) {
            JAXB.marshal(new FindBusiness(), sw);
        }
        if (method.equalsIgnoreCase("findService")) {
View Full Code Here

            resultsKeyBag.getBindingKey().add(key);
         
          result.getKeyBag().add(resultsKeyBag);
        }
        else {
          FindBinding fb = subscriptionFilter.getFindBinding();
          org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
          findQualifiers.mapApiFindQualifiers(fb.getFindQualifiers());
         
          // To do subscription "chunking", the listHead and maxRows are nulled which will set them to system default.  User settings for
          // these values don't make sense with the "chunking" feature.
          fb.setListHead(null);
          fb.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          BindingDetail bindingDetail = InquiryHelper.getBindingDetailFromKeys(fb, findQualifiers, em, currentMatchingKeys,
                                             startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
             
          // Upon exiting above function, if more results are to be had, the subscriptionStartIndex will contain the latest value (or null
          // if no more results)
          chunkData = subscriptionStartIndex.value;
         
          result.setBindingDetail(bindingDetail);
        }
      }
      if (subscriptionFilter.getFindBusiness() != null) {
        //Get the current matching keys
        List<?> currentMatchingKeys = getSubscriptionMatches(subscriptionFilter, em);
 
        List<String> missingKeys = getMissingKeys(currentMatchingKeys, modelSubscription.getSubscriptionMatches());
        if (missingKeys != null && missingKeys.size() > 0) {
          KeyBag missingKeyBag = new KeyBag();
          missingKeyBag.setDeleted(true);
          for (String key : missingKeys)
            missingKeyBag.getBusinessKey().add(key);
 
          result.getKeyBag().add(missingKeyBag);
        }
       
        // Re-setting the subscription matches to the new matching key collection
        //modelSubscription.getSubscriptionMatches().clear();
        //for (Object key : currentMatchingKeys) {
        //  SubscriptionMatch subMatch = new SubscriptionMatch(modelSubscription, (String)key);
        //  modelSubscription.getSubscriptionMatches().add(subMatch);
        //}
       
        // Now, finding the necessary entities, within the coverage period limits
        if (modelSubscription.isBrief()) {
          KeyBag resultsKeyBag = new KeyBag();
          for (String key : (List<String>)currentMatchingKeys)
            resultsKeyBag.getBusinessKey().add(key);
         
          result.getKeyBag().add(resultsKeyBag);
        }
        else {
          FindBusiness fb = subscriptionFilter.getFindBusiness();
          org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
          findQualifiers.mapApiFindQualifiers(fb.getFindQualifiers());
         
          // To do subscription "chunking", the listHead and maxRows are nulled which will set them to system default.  User settings for
          // these values don't make sense with the "chunking" feature.
          fb.setListHead(null);
          fb.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          BusinessList businessList = InquiryHelper.getBusinessListFromKeys(fb, findQualifiers, em, currentMatchingKeys,
                                            startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
View Full Code Here

    // However, we are sticking to v2 for now, so categorybag doesn't
    // exist under FindBinding. It is fine for now, since the incoming
    // parameter value is always null anyways -- but this may change
    // in the future.

    FindBinding request = this.objectFactory.createFindBinding();

    if (serviceKey != null) {
      request.setServiceKey(serviceKey);
    }

    if (categoryBag != null) {
      request.setCategoryBag(categoryBag);
    }
   
    if (tModelBag != null) {
      request.setTModelBag(tModelBag);
    }

    if (findQualifiers != null) {
      request.setFindQualifiers(findQualifiers);
    }
    request.setMaxRows(maxRows);

        BindingDetail bd = null;
        JAXBElement<?> o = execute(this.objectFactory.createFindBinding(request),
            this.getInquiryURI());
        if (o != null) bd = (BindingDetail) o.getValue();
View Full Code Here

      Assert.fail("No exception should be thrown.");
    }
  }
  public void findBinding(String findQualifier) {
    try {
      FindBinding body = (FindBinding)EntityCreator.buildFromDoc(FIND_BINDING_XML, "org.uddi.api_v3");
      if (findQualifier!=null) body.getFindQualifiers().getFindQualifier().add(findQualifier);
      BindingDetail result = inquiry.findBinding(body);
      if (result == null)
        Assert.fail("Null result from find binding operation");
      List<BindingTemplate> btList = result.getBindingTemplate();
      if (btList == null || btList.size() == 0)
View Full Code Here

            resultsKeyBag.getBindingKey().add(key);
         
          result.getKeyBag().add(resultsKeyBag);
        }
        else {
          FindBinding fb = subscriptionFilter.getFindBinding();
          org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
          findQualifiers.mapApiFindQualifiers(fb.getFindQualifiers());
         
          // To do subscription "chunking", the listHead and maxRows are nulled which will set them to system default.  User settings for
          // these values don't make sense with the "chunking" feature.
          fb.setListHead(null);
          fb.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          BindingDetail bindingDetail = InquiryHelper.getBindingDetailFromKeys(fb, findQualifiers, em, currentMatchingKeys,
                                             startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
             
          // Upon exiting above function, if more results are to be had, the subscriptionStartIndex will contain the latest value (or null
          // if no more results)
          chunkData = subscriptionStartIndex.value;
         
          result.setBindingDetail(bindingDetail);
        }
      }
      if (subscriptionFilter.getFindBusiness() != null) {
        //Get the current matching keys
        List<?> currentMatchingKeys = getSubscriptionMatches(subscriptionFilter, em);
 
        List<String> missingKeys = getMissingKeys(currentMatchingKeys, modelSubscription.getSubscriptionMatches());
        if (missingKeys != null && missingKeys.size() > 0) {
          KeyBag missingKeyBag = new KeyBag();
          missingKeyBag.setDeleted(true);
          for (String key : missingKeys)
            missingKeyBag.getBusinessKey().add(key);
 
          result.getKeyBag().add(missingKeyBag);
        }
       
        // Re-setting the subscription matches to the new matching key collection
        //modelSubscription.getSubscriptionMatches().clear();
        //for (Object key : currentMatchingKeys) {
        //  SubscriptionMatch subMatch = new SubscriptionMatch(modelSubscription, (String)key);
        //  modelSubscription.getSubscriptionMatches().add(subMatch);
        //}
       
        // Now, finding the necessary entities, within the coverage period limits
        if (modelSubscription.isBrief()) {
          KeyBag resultsKeyBag = new KeyBag();
          for (String key : (List<String>)currentMatchingKeys)
            resultsKeyBag.getBusinessKey().add(key);
         
          result.getKeyBag().add(resultsKeyBag);
        }
        else {
          FindBusiness fb = subscriptionFilter.getFindBusiness();
          org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
          findQualifiers.mapApiFindQualifiers(fb.getFindQualifiers());
         
          // To do subscription "chunking", the listHead and maxRows are nulled which will set them to system default.  User settings for
          // these values don't make sense with the "chunking" feature.
          fb.setListHead(null);
          fb.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          BusinessList businessList = InquiryHelper.getBusinessListFromKeys(fb, findQualifiers, em, currentMatchingKeys,
                                            startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.FindBinding

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.