Package com.opera.core.systems.scope.protos

Examples of com.opera.core.systems.scope.protos.ScopeProtos$ServiceList$Builder


    /**
     * Create an instance of {@link ServiceList }
     *
     */
    public ServiceList createServiceList() {
        return new ServiceList();
    }
View Full Code Here


      request.setFindQualifiers(findQualifiers);
    }

    request.setMaxRows(maxRows);

        ServiceList sl;
        JAXBElement<?> o = execute(this.objectFactory.createFindService(request),
            this.getInquiryURI());
        sl = (ServiceList) o.getValue();

        return sl;
View Full Code Here

            if (orgKey != null) {
                id = orgKey.getId();
            }

            ServiceList serviceList = iRegistry.findService(id,
                juddiNames,
                    ScoutJaxrUddiHelper.getCategoryBagFromClassifications(classifications),
                    null,
                    juddiFindQualifiers, registryService.getMaxRows());

            /*
             * now convert  from jUDDI ServiceInfo objects to JAXR Services
             */
            if (serviceList != null) {

                ServiceInfos serviceInfos = serviceList.getServiceInfos();
                LinkedHashSet<Service> col = new LinkedHashSet<Service>();
               
                if(serviceInfos != null && serviceInfos.getServiceInfo()!=null) {
                  for (ServiceInfo si : serviceInfos.getServiceInfo()) {
                    Service srv = (Service) getRegistryObject(si.getServiceKey(), LifeCycleManager.SERVICE);
View Full Code Here

      request.setFindQualifiers(findQualifiers);
    }

    request.setMaxRows(maxRows);

        ServiceList sl;
        JAXBElement<?> o = execute(this.objectFactory.createFindService(request),
            this.getInquiryURI());
        sl = (ServiceList) o.getValue();

        return sl;
View Full Code Here

            if (orgKey != null) {
                id = orgKey.getId();
            }

            ServiceList serviceList = iRegistry.findService(id,
                juddiNames,
                    ScoutJaxrUddiHelper.getCategoryBagFromClassifications(classifications),
                    null,
                    juddiFindQualifiers, registryService.getMaxRows());

            /*
             * now convert  from jUDDI ServiceInfo objects to JAXR Services
             */
            if (serviceList != null) {

                ServiceInfos serviceInfos = serviceList.getServiceInfos();
                LinkedHashSet<Service> col = new LinkedHashSet<Service>();
               
                if(serviceInfos != null && serviceInfos.getServiceInfo()!=null) {
                  for (ServiceInfo si : serviceInfos.getServiceInfo()) {
                    Service srv = (Service) getRegistryObject(si.getServiceKey(), LifeCycleManager.SERVICE);
View Full Code Here

       
        public static ServiceList MapServiceList(org.uddi.api_v3.ServiceList findService, String operator) {
                if (findService == null) {
                        return null;
                }
                ServiceList r = new ServiceList();
                r.setGeneric(VERSION);
                r.setOperator(operator);
                r.setServiceInfos(MapServiceInfos(findService.getServiceInfos()));
                if (findService.isTruncated() != null && findService.isTruncated()) {
                        r.setTruncated(Truncated.TRUE);
                } else {
                        r.setTruncated(Truncated.FALSE);
                }
                return r;
        }
View Full Code Here

 
  public String findService() {
    String serviceKey = null;
    try {
      FindService body = (FindService)EntityCreator.buildFromDoc(FIND_SERVICE_XML, "org.uddi.api_v3");
      ServiceList result = inquiry.findService(body);
      if (result == null)
        Assert.fail("Null result from find service operation");
      ServiceInfos sInfos = result.getServiceInfos();
      if (sInfos == null)
        Assert.fail("No result from find service operation");
      List<ServiceInfo> siList = sInfos.getServiceInfo();
      if (siList == null || siList.size() == 0)
        Assert.fail("No result from find service operation");
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)
      result.setServiceInfos(new org.uddi.api_v3.ServiceInfos());

    // Set the currentIndex to 0 or the value of the subscriptionStartIndex
    int currentIndex = 0;
    if (subscriptionStartIndex != null && subscriptionStartIndex.value != null)
      currentIndex = subscriptionStartIndex.value;

    int returnedRowCount = 0;
   
    while (currentIndex < queryResults.size()) {
      Object item = queryResults.get(currentIndex);

      org.apache.juddi.model.BusinessService modelBusinessService = (org.apache.juddi.model.BusinessService)item;
      org.uddi.api_v3.ServiceInfo apiServiceInfo = new org.uddi.api_v3.ServiceInfo();
     
      if (modifiedAfter != null && modifiedAfter.after(modelBusinessService.getModifiedIncludingChildren())) {
        currentIndex++;
        continue;
      }
     
      if (modifiedBefore != null && modifiedBefore.before(modelBusinessService.getModifiedIncludingChildren())) {
        currentIndex++;
        continue;
      }
     
      MappingModelToApi.mapServiceInfo(modelBusinessService, apiServiceInfo);
     
      result.getServiceInfos().getServiceInfo().add(apiServiceInfo);

      returnedRowCount++;
      // If the returned rows equals the max allowed, we can end the loop (applies to subscription calls only)
      if (subscriptionMaxRows != null) {
        if (returnedRowCount == subscriptionMaxRows)
View Full Code Here

          fs.setListHead(null);
          fs.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
 
          ServiceList serviceList = InquiryHelper.getServiceListFromKeys(fs, findQualifiers, em, currentMatchingKeys,
                                           startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
          if (serviceList.getServiceInfos()==null || serviceList.getServiceInfos().getServiceInfo().size()==0) {
            serviceList=null;
          }
          // 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;
View Full Code Here

                              throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ServiceNotFound", businessKey));
                          }
                }
            }

      ServiceList result = InquiryHelper.getServiceListFromKeys(body, findQualifiers, em, keysFound);

      tx.commit();
                        long procTime = System.nanoTime() - startTime;
                        serviceCounter.update(InquiryQuery.FIND_SERVICE, QueryStatus.SUCCESS, procTime);                     
View Full Code Here

TOP

Related Classes of com.opera.core.systems.scope.protos.ScopeProtos$ServiceList$Builder

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.