Package org.uddi.api_v2

Examples of org.uddi.api_v2.GetTModelDetail


                return r;
        }
       
        private static TModelInstanceDetails MapTModelInstanceDetails(org.uddi.api_v3.TModelInstanceDetails tModelInstanceDetails) {
                if (tModelInstanceDetails == null) {
                        return new TModelInstanceDetails();
                }
                TModelInstanceDetails r = new TModelInstanceDetails();
                r.getTModelInstanceInfo().addAll(MapTModelInstanceInfo(tModelInstanceDetails.getTModelInstanceInfo()));
                return r;
        }
View Full Code Here


                List<TModelInstanceInfo> r = new ArrayList<TModelInstanceInfo>();
                if (tModelInstanceInfo == null) {
                        return r;
                }
                for (int i = 0; i < tModelInstanceInfo.size(); i++) {
                        TModelInstanceInfo t = new TModelInstanceInfo();
                        t.setTModelKey(tModelInstanceInfo.get(i).getTModelKey());
                        t.getDescription().addAll(MapDescription(tModelInstanceInfo.get(i).getDescription()));
                        if (tModelInstanceInfo.get(i).getInstanceDetails() != null) {
                                t.setInstanceDetails(new InstanceDetails());
                                t.getInstanceDetails().getDescription().addAll(MapDescription(tModelInstanceInfo.get(i).getInstanceDetails().getDescription()));
                                t.getInstanceDetails().setInstanceParms(StringEscapeUtils.escapeXml(tModelInstanceInfo.get(i).getInstanceDetails().getInstanceParms()));
                                t.getInstanceDetails().setOverviewDoc(MapOverviewDoc(tModelInstanceInfo.get(i).getInstanceDetails().getOverviewDoc()));
                        }
                        r.add(t);
                }
                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

 
  public InquiryResponse getTModelDetail(String authToken, String tModelKey)
  {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    GetTModelDetail getTModelDetail = new GetTModelDetail();
    getTModelDetail.setAuthInfo(authToken);
    getTModelDetail.getTModelKey().add(tModelKey);
    InquiryResponse response = new InquiryResponse();
    logger.debug("TModelDetail " + getTModelDetail + " sending tmodelDetail request..");
    Map<String,String> tmodelDetailMap = new HashMap<String,String>();
    try {
       Transport transport = WebHelper.getTransport(session.getServletContext());
View Full Code Here

      org.uddi.api_v3.TModel tmIn = (org.uddi.api_v3.TModel)EntityCreator.buildFromDoc(tModelXml, "org.uddi.api_v3");
      st.getTModel().add(tmIn);
      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());
View Full Code Here

        else
          result.setServiceDetail(serviceDetail);
       
      }
      if (subscriptionFilter.getGetTModelDetail() != null) {
        GetTModelDetail getDetail = subscriptionFilter.getGetTModelDetail();
 
        // Running through the key list here to determine the deleted keys and store the existing entities.
        KeyBag missingKeyBag = new KeyBag();
        missingKeyBag.setDeleted(true);
        List<org.apache.juddi.model.Tmodel> existingList = new ArrayList<org.apache.juddi.model.Tmodel>(0);
        for (String key : getDetail.getTModelKey()) {
          org.apache.juddi.model.Tmodel modelTModel = em.find(org.apache.juddi.model.Tmodel.class, key);
          if (modelTModel != null)
            existingList.add(modelTModel);
          else
            missingKeyBag.getTModelKey().add(key);
View Full Code Here

        else
          result.setServiceDetail(serviceDetail);
       
      }
      if (subscriptionFilter.getGetTModelDetail() != null) {
        GetTModelDetail getDetail = subscriptionFilter.getGetTModelDetail();
 
        // Running through the key list here to determine the deleted keys and store the existing entities.
        KeyBag missingKeyBag = new KeyBag();
        missingKeyBag.setDeleted(true);
        List<org.apache.juddi.model.Tmodel> existingList = new ArrayList<org.apache.juddi.model.Tmodel>(0);
        for (String key : getDetail.getTModelKey()) {
          org.apache.juddi.model.Tmodel modelTModel = em.find(org.apache.juddi.model.Tmodel.class, key);
          if (modelTModel != null)
            existingList.add(modelTModel);
          else
            missingKeyBag.getTModelKey().add(key);
View Full Code Here

                }
        }

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

        }

        public TModelDetail getTModelDetail(String authInfo, String tModelXml, String tModelKey) {
                try {
                        //Try to get the TModel
                        GetTModelDetail tmodelDetail = new GetTModelDetail();
                        tmodelDetail.setAuthInfo(authInfo);
                        tmodelDetail.getTModelKey().add(tModelKey);

                        return inquiry.getTModelDetail(tmodelDetail);

                } catch (Exception e) {
                        logger.error(e.getMessage(), e);
View Full Code Here

        }
        if (method.equalsIgnoreCase("getOperationalInfo")) {
            JAXB.marshal(new GetOperationalInfo(), sw);
        }
        if (method.equalsIgnoreCase("getTModelDetail")) {
            JAXB.marshal(new GetTModelDetail(), sw);
        }
        return PrettyPrintXML(sw.toString());
    }
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.GetTModelDetail

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.