Package org.uddi.api_v2

Examples of org.uddi.api_v2.TModelDetail


    if (tModelArray != null) {
      request.getTModel().addAll(Arrays.asList(tModelArray));
    }

        TModelDetail tmd = null;
        JAXBElement<?> o = execute(this.objectFactory.createSaveTModel(request),
            this.getPublishURI());
        if (o != null) tmd = (TModelDetail) o.getValue();
        return tmd;
  }
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

        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

      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().toLowerCase(), tmOut.getTModelKey());
      assertEquals(tmIn.getName().getLang(), tmOut.getName().getLang());
      assertEquals(tmIn.getName().getValue(), tmOut.getName().getValue());
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();
                        long procTime = System.nanoTime() - startTime;
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 = null;
        try {
          modelTModel = em.find(org.apache.juddi.model.Tmodel.class, tmodelKey);
        } catch (ClassCastException e) {}
        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

            kr.setKeyName("uddi-org:keyGenerator");
            kr.setKeyValue("keyGenerator");
            tm.getCategoryBag().getKeyedReference().add(kr);
            tm.setTModelKey("uddi:www.mycoolcompany.com:keygenerator");
            st.getTModel().add(tm);
            TModelDetail saveTModel = publish.saveTModel(st);
            System.out.println("Creation of Partition Success!");

            tm = new TModel();
            tm.setName(new Name());
            tm.getName().setValue("My Company's Department");
View Full Code Here

  }
  /**
   * Register a tModel.
   */
  public TModelDetail register(TModel tModel, Node node) {
    TModelDetail tModelDetail = null;
    log.info("Registering tModel with key " + tModel.getTModelKey());
    try {
      String authToken = getAuthToken(node.getSecurityUrl());
      SaveTModel saveTModel = new SaveTModel();
      saveTModel.setAuthInfo(authToken);
View Full Code Here

  public TModelDetail getTModelDetail(GetTModelDetail getTModelDetail, Node node) throws RemoteException,
  TransportException, ConfigurationException  {
   
    getTModelDetail.setAuthInfo(getAuthToken(node.getSecurityUrl()));
    try {
      TModelDetail tModelDetail = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getTModelDetail(getTModelDetail);
      return tModelDetail;
    } catch (DispositionReportFaultMessage dr) {
      DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
      checkForErrorInDispositionReport(report, null, null);
    } catch (SOAPFaultException sfe) {
View Full Code Here

                    clerk.unRegisterService(serviceKey);
                    if (bindingTemplate.getTModelInstanceDetails() != null
                            && bindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo() != null) {
                        for (TModelInstanceInfo tModelInstanceInfo : bindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo()) {
                            String tModelKey = tModelInstanceInfo.getTModelKey();
                            TModelDetail tModelDetail = clerk.getTModelDetail(tModelKey);
                            //delete all tModels assuming they are the portType and Binding tModels.
                            if (tModelDetail.getTModel() != null && tModelDetail.getTModel().size() > 0) {
                                for (TModel tModel : tModelDetail.getTModel()) {
                                    clerk.unRegisterTModel(tModel.getTModelKey());
                                }
                            }
                        }
                    }
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.