Examples of TModelDetail


Examples of org.uddi.api_v3.TModelDetail

        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

Examples of org.uddi.api_v3.TModelDetail

    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

Examples of org.uddi.api_v3.TModelDetail

      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

Examples of org.uddi.api_v3.TModelDetail

        // 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

Examples of org.uddi.api_v3.TModelDetail

      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

Examples of org.uddi.api_v3.TModelDetail

 
      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

Examples of org.uddi.api_v3.TModelDetail

      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

Examples of org.uddi.api_v3.TModelDetail

        // 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

Examples of org.uddi.api_v3.TModelDetail

        private TModel saveTModel(String authInfo, TModel tmIn, boolean force) {
                boolean exists = false;
                GetTModelDetail gt1 = new GetTModelDetail();
                gt1.getTModelKey().add(tmIn.getTModelKey());
                try {
                        TModelDetail td1 = inquiry.getTModelDetail(gt1);
                        if (td1 != null && !td1.getTModel().isEmpty()) {
                                if (!td1.getTModel().get(0).isDeleted()) {
                                        exists = true;
                                } else {
                                        logger.info("The tModel with key " + tmIn.getTModelKey() + " exists already, but is flagged as deleted. Overwritting");
                                }
                        }
                } catch (Exception ex) {
                }

                if (!exists || force) // Add the tModel
                {
                        try {
                                SaveTModel st = new SaveTModel();
                                st.setAuthInfo(authInfo);

                                st.getTModel().add(tmIn);
                                publication.saveTModel(st);

                                keyscreated.add(tmIn.getTModelKey());
                                // Now get the entity and check the values
                                GetTModelDetail gt = new GetTModelDetail();
                                gt.getTModelKey().add(tmIn.getTModelKey());
                                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().toLowerCase(), tmOut.getTModelKey());
                                assertEquals(tmIn.getName().getLang(), tmOut.getName().getLang());
                                assertEquals(tmIn.getName().getValue(), tmOut.getName().getValue());
View Full Code Here

Examples of org.uddi.api_v3.TModelDetail

 
      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();
                        long procTime = System.currentTimeMillis() - startTime;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.