Package org.uddi.api_v2

Examples of org.uddi.api_v2.TModelDetail


       
        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;
                }
               
View Full Code Here


                                x.getDescription().addAll(MapDescription(registeredInfo.getBusinessInfos().getBusinessInfo().get(i).getDescription()));
                                x.setServiceInfos(MapServiceInfos(registeredInfo.getBusinessInfos().getBusinessInfo().get(i).getServiceInfos()));
                        }
                }
                if (registeredInfo.getTModelInfos() != null) {
                        r.setTModelInfos(new TModelInfos());
                        r.getTModelInfos().getTModelInfo().addAll(MapTModelInfo(registeredInfo.getTModelInfos().getTModelInfo()));
                }
               
                return r;
               
View Full Code Here

                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

        getSubResultsIn.setChunkToken(chunkToken);
        SubscriptionResultsList result = subscription.getSubscriptionResults(getSubResultsIn);
        if (result == null)
          Assert.fail("Null result from getSubscriptionResults operation");
       
        TModelDetail tmodelDetail = result.getTModelDetail();
        if (tmodelDetail == null)
          Assert.fail("No result from getSubscriptionResults operation on chunk attempt " + iterations);

        int resultSize = tmodelDetail.getTModel().size();
       
        if (iterations < expectedIterations)
          assertEquals(resultSize, subIn.getMaxEntities().intValue());
        else {
          if (FINDQUALIFIER_TMODEL_TOTAL % subIn.getMaxEntities() > 0)
View Full Code Here

    logger.debug("TModelDetail " + getTModelDetail + " sending tmodelDetail request..");
    Map<String,String> tmodelDetailMap = new HashMap<String,String>();
    try {
       Transport transport = WebHelper.getTransport(session.getServletContext());
           UDDIInquiryPortType inquiryService = transport.getUDDIInquiryService();
           TModelDetail tmodelDetail = inquiryService.getTModelDetail(getTModelDetail);
           //demo code fix up what to return for real.
           for (TModel tmodel : tmodelDetail.getTModel()) {
             tmodelDetailMap.put("name",tmodel.getName().getValue());
       }
           response.setSuccess(true);
          
       } catch (Exception e) {
View Full Code Here

      publication.saveTModel(st);
 
      // Now get the entity and check the values
      GetTModelDetail gt = new GetTModelDetail();
      gt.getTModelKey().add(tModelKey);
      TModelDetail td = inquiry.getTModelDetail(gt);
      List<org.uddi.api_v3.TModel> tmOutList = td.getTModel();
      org.uddi.api_v3.TModel tmOut = tmOutList.get(0);

      assertEquals(tmIn.getTModelKey(), tmOut.getTModelKey());
      assertEquals(tmIn.getName().getLang(), tmOut.getName().getLang());
      assertEquals(tmIn.getName().getValue(), tmOut.getName().getValue());
View Full Code Here

        // Store deleted keys in the results
        if (missingKeyBag.getTModelKey() != null && missingKeyBag.getTModelKey().size() > 0)
          result.getKeyBag().add(missingKeyBag);
       
        KeyBag resultsKeyBag = new KeyBag();
        TModelDetail tmodelDetail = new TModelDetail();
 
        // Set the currentIndex to 0 or the value of the chunkData
        int currentIndex = 0;
        if (chunkData != null)
          currentIndex = chunkData;
       
        int returnedRowCount = 0;
        while(currentIndex < existingList.size()) {
 
          org.apache.juddi.model.Tmodel modelTModel = existingList.get(currentIndex);
           
          if (startPointDate.after(modelTModel.getModifiedIncludingChildren())) {
            currentIndex++;
            continue;
          }
         
          if (endPointDate.before(modelTModel.getModifiedIncludingChildren())) {
            currentIndex++;
            continue;
          }
         
          if (modelSubscription.isBrief()) {
            resultsKeyBag.getTModelKey().add(modelTModel.getEntityKey());
          }
          else {
            org.uddi.api_v3.TModel apiTModel = new org.uddi.api_v3.TModel();
            MappingModelToApi.mapTModel(modelTModel, apiTModel);
            tmodelDetail.getTModel().add(apiTModel);
           
            returnedRowCount++;
          }
 
          // If the returned rows equals the max allowed, we can end the loop.
View Full Code Here

      tx.begin();

      if (isAuthenticated())
        this.getEntityPublisher(em, body.getAuthInfo());

      TModelDetail result = new TModelDetail();

      List<String> tmodelKeyList = body.getTModelKey();
      for (String tmodelKey : tmodelKeyList) {

        org.apache.juddi.model.Tmodel modelTModel = em.find(org.apache.juddi.model.Tmodel.class, tmodelKey);
        if (modelTModel == null) {
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.TModelNotFound", tmodelKey));
        }

        org.uddi.api_v3.TModel apiTModel = new org.uddi.api_v3.TModel();

        MappingModelToApi.mapTModel(modelTModel, apiTModel);

        result.getTModel().add(apiTModel);
      }

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

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
 
      new ValidatePublish(publisher).validateSaveTModel(em, body, null);
 
      TModelDetail result = new TModelDetail();
 
      List<org.uddi.api_v3.TModel> apiTModelList = body.getTModel();
      for (org.uddi.api_v3.TModel apiTModel : apiTModelList) {
       
        org.apache.juddi.model.Tmodel modelTModel = new org.apache.juddi.model.Tmodel();
       
        MappingApiToModel.mapTModel(apiTModel, modelTModel);
 
        setOperationalInfo(em, modelTModel, publisher);
 
        em.persist(modelTModel);
       
        result.getTModel().add(apiTModel);
       
      }
 
      tx.commit();
      return result;
View Full Code Here

      tx.begin();
 
      if (isAuthenticated())
        this.getEntityPublisher(em, body.getAuthInfo());
     
      TModelDetail result = new TModelDetail();
     
      List<String> tmodelKeyList = body.getTModelKey();
      for (String tmodelKey : tmodelKeyList) {
       
        org.apache.juddi.model.Tmodel modelTModel = em.find(org.apache.juddi.model.Tmodel.class, tmodelKey);
        if (modelTModel == null) {
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.TModelNotFound", tmodelKey));
        }
       
        org.uddi.api_v3.TModel apiTModel = new org.uddi.api_v3.TModel();
       
        MappingModelToApi.mapTModel(modelTModel, apiTModel);
       
        result.getTModel().add(apiTModel);
      }
 
      tx.commit()
      return result;
    } finally {
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.TModelDetail

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.