Package org.uddi.api_v3

Examples of org.uddi.api_v3.ListDescription


  }
 
  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 BindingDetail getBindingDetailFromKeys(FindBinding body, FindQualifiers findQualifiers, EntityManager em, List<?> keysFound,
                             Date modifiedAfter, Date modifiedBefore, Holder<Integer> subscriptionStartIndex, Integer subscriptionMaxRows)
           throws DispositionReportFaultMessage {

    BindingDetail result = new BindingDetail();
    ListDescription listDesc = new ListDescription();
    result.setListDescription(listDesc);
   
    // Sort and retrieve the final results with paging taken into account
    List<?> queryResults = FetchBindingTemplatesQuery.select(em, findQualifiers, keysFound, body.getMaxRows(), body.getListHead(), listDesc);
View Full Code Here

  public static BusinessList getBusinessListFromKeys(FindBusiness body, FindQualifiers findQualifiers, EntityManager em, List<?> keysFound,
                             Date modifiedAfter, Date modifiedBefore, Holder<Integer> subscriptionStartIndex, Integer subscriptionMaxRows)
           throws DispositionReportFaultMessage {

    BusinessList result = new BusinessList();
    ListDescription listDesc = new ListDescription();
    result.setListDescription(listDesc);

    // Sort and retrieve the final results taking paging into account
    List<?> queryResults = FetchBusinessEntitiesQuery.select(em, findQualifiers, keysFound, body.getMaxRows(), body.getListHead(), listDesc);
    List<?> serviceResults = null;
    for (int i = 0; i<queryResults.size(); i++) {
      org.apache.juddi.model.BusinessEntity be = (org.apache.juddi.model.BusinessEntity) queryResults.get(i);
     
      List<Object> keysIn = new ArrayList<Object>();
      List<org.apache.juddi.model.BusinessService> services = be.getBusinessServices();
      for (int j = 0; j<services.size(); j++) {
        keysIn.add(services.get(j).getEntityKey());
      }

      serviceResults = FindServiceByTModelKeyQuery.select(em, findQualifiers, body.getTModelBag(), null, keysIn);
      if (serviceResults == null) {
        be.setBusinessServices(null);
      } else {
        ListDescription ldesc = new ListDescription();
        result.setListDescription(listDesc);
        List<?> srvcs = FetchBusinessServicesQuery.select(em, findQualifiers, serviceResults, body.getMaxRows(),
            body.getListHead(), ldesc);
        be.setBusinessServices((List<org.apache.juddi.model.BusinessService>)srvcs);
      }
View Full Code Here

  public static ServiceList getServiceListFromKeys(FindService body, FindQualifiers findQualifiers, EntityManager em, List<?> keysFound,
                           Date modifiedAfter, Date modifiedBefore, Holder<Integer> subscriptionStartIndex, Integer subscriptionMaxRows)
           throws DispositionReportFaultMessage {
    ServiceList result = new ServiceList();
    ListDescription listDesc = new ListDescription();
    result.setListDescription(listDesc);
   
    // Sort and retrieve the final results taking paging into account
    List<?> queryResults = FetchBusinessServicesQuery.select(em, findQualifiers, keysFound, body.getMaxRows(), body.getListHead(), listDesc);
    if (queryResults != null && queryResults.size() > 0)
View Full Code Here

 
  public static TModelList getTModelListFromKeys(FindTModel body, FindQualifiers findQualifiers, EntityManager em, List<?> keysFound,
                           Date modifiedAfter, Date modifiedBefore, Holder<Integer> subscriptionStartIndex, Integer subscriptionMaxRows)
           throws DispositionReportFaultMessage {
    TModelList result = new TModelList();
    ListDescription listDesc = new ListDescription();
    result.setListDescription(listDesc);

    // Sort and retrieve the final results taking paging into account
    List<?> queryResults = FetchTModelsQuery.select(em, findQualifiers, keysFound, body.getMaxRows(), body.getListHead(), listDesc);
    if (queryResults != null && queryResults.size() > 0)
View Full Code Here

  }
 
  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

     
      ValidatePublish validator = new ValidatePublish(publisher);
      validator.validateSaveBinding(em, body, null);
 
      BindingDetail result = new BindingDetail();
                        result.setListDescription(new ListDescription());
      List<org.uddi.api_v3.BindingTemplate> apiBindingTemplateList = body.getBindingTemplate();
      for (org.uddi.api_v3.BindingTemplate apiBindingTemplate : apiBindingTemplateList) {
       
        org.apache.juddi.model.BindingTemplate modelBindingTemplate = new org.apache.juddi.model.BindingTemplate();
                               
View Full Code Here

  public static BindingDetail getBindingDetailFromKeys(FindBinding body, FindQualifiers findQualifiers, EntityManager em, List<?> keysFound,
                             Date modifiedAfter, Date modifiedBefore, Holder<Integer> subscriptionStartIndex, Integer subscriptionMaxRows)
           throws DispositionReportFaultMessage {

    BindingDetail result = new BindingDetail();
    ListDescription listDesc = new ListDescription();
    result.setListDescription(listDesc);
   
    // Sort and retrieve the final results with paging taken into account
    List<?> queryResults = FetchBindingTemplatesQuery.select(em, findQualifiers, keysFound, body.getMaxRows(), body.getListHead(), listDesc);
View Full Code Here

  public static BusinessList getBusinessListFromKeys(FindBusiness body, FindQualifiers findQualifiers, EntityManager em, List<?> keysFound,
                             Date modifiedAfter, Date modifiedBefore, Holder<Integer> subscriptionStartIndex, Integer subscriptionMaxRows)
           throws DispositionReportFaultMessage {

    BusinessList result = new BusinessList();
    ListDescription listDesc = new ListDescription();
    result.setListDescription(listDesc);

    // Sort and retrieve the final results taking paging into account
    List<?> queryResults = FetchBusinessEntitiesQuery.select(
        em, findQualifiers, keysFound, body.getMaxRows(), body.getListHead(), listDesc);
View Full Code Here

  public static ServiceList getServiceListFromKeys(FindService body, FindQualifiers findQualifiers, EntityManager em, List<?> keysFound,
                           Date modifiedAfter, Date modifiedBefore, Holder<Integer> subscriptionStartIndex, Integer subscriptionMaxRows)
           throws DispositionReportFaultMessage {
    ServiceList result = new ServiceList();
    ListDescription listDesc = new ListDescription();
    result.setListDescription(listDesc);
   
    // Sort and retrieve the final results taking paging into account
    List<?> queryResults = FetchBusinessServicesQuery.select(em, findQualifiers, keysFound, body.getMaxRows(), body.getListHead(), listDesc);
    if (queryResults != null && queryResults.size() > 0)
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.ListDescription

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.