Package org.uddi.api_v2

Examples of org.uddi.api_v2.SaveTModel


  public void saveTModel(String authInfo, String tModelXml, String tModelKey) {
   
    // Add the tModel
    try {
      SaveTModel st = new SaveTModel();
      st.setAuthInfo(authInfo);

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


   * @throws ConfigurationException
   */
  public static void installSaveTModel(EntityManager em, String fileName, UddiEntityPublisher publisher, String nodeId, Configuration config)
    throws JAXBException, DispositionReportFaultMessage, IOException, ConfigurationException {

    SaveTModel apiSaveTModel = (SaveTModel)buildInstallEntity(fileName, "org.uddi.api_v3", config);
    if (apiSaveTModel!=null) installTModels(em, apiSaveTModel.getTModel(), publisher, nodeId);
  }
View Full Code Here

   * @throws ConfigurationException
   */
  public static void installSaveTModel(EntityManager em, String fileName, UddiEntityPublisher publisher, String nodeId, Configuration config)
    throws JAXBException, DispositionReportFaultMessage, IOException, ConfigurationException {

    SaveTModel apiSaveTModel = (SaveTModel)buildInstallEntity(fileName, "org.uddi.api_v3", config);
    if (apiSaveTModel!=null) installTModels(em, apiSaveTModel.getTModel(), publisher, nodeId);
  }
View Full Code Here

   * @throws ConfigurationException
   */
  public static void installSaveTModel(EntityManager em, String fileName, UddiEntityPublisher publisher, String nodeId, Configuration config)
    throws JAXBException, DispositionReportFaultMessage, IOException, ConfigurationException {

    SaveTModel apiSaveTModel = (SaveTModel)buildInstallEntity(fileName, "org.uddi.api_v3", config);
    if (apiSaveTModel!=null) installTModels(em, apiSaveTModel.getTModel(), publisher, nodeId);
  }
View Full Code Here

   * @throws ConfigurationException
   */
  public static void installSaveTModel(EntityManager em, String fileName, UddiEntityPublisher publisher, String nodeId, Configuration config)
    throws JAXBException, DispositionReportFaultMessage, IOException, ConfigurationException {

    SaveTModel apiSaveTModel = (SaveTModel)buildInstallEntity(fileName, "org.uddi.api_v3", config);
    if (apiSaveTModel!=null) installTModels(em, apiSaveTModel.getTModel(), publisher, nodeId);
  }
View Full Code Here

         */
        public void saveTModels(String authInfo, String tModelXml) {

                // Add tModels
                try {
                        SaveTModel st = (org.uddi.api_v3.SaveTModel) EntityCreator.buildFromDoc(tModelXml, "org.uddi.api_v3");

                        for (int i = 0; i < st.getTModel().size(); i++) {
                                 saveTModel(authInfo, st.getTModel().get(i), false);
                        }
                        //st.setAuthInfo(authInfo);
                        //publication.saveTModel(st);

                } catch (Exception e) {
View Full Code Here

                }

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

        }
        if (method.equalsIgnoreCase("saveBusiness")) {
            JAXB.marshal(new SaveBusiness(), sw);
        }
        if (method.equalsIgnoreCase("saveTModel")) {
            JAXB.marshal(new SaveTModel(), sw);
        }
        if (method.equalsIgnoreCase("saveService")) {
            JAXB.marshal(new SaveService(), sw);
        }
        if (method.equalsIgnoreCase("setPublisherAssertions")) {
View Full Code Here

   * @throws ConfigurationException
   */
  public static void installSaveTModel(EntityManager em, String fileName, UddiEntityPublisher publisher, String nodeId, Configuration config)
    throws JAXBException, DispositionReportFaultMessage, IOException, ConfigurationException {

    SaveTModel apiSaveTModel = (SaveTModel)buildInstallEntity(fileName, "org.uddi.api_v3", config);
    if (apiSaveTModel!=null) installTModels(em, apiSaveTModel.getTModel(), publisher, nodeId);
  }
View Full Code Here

                int maxrows = 100;

                req.setMaxRows(maxrows);
                req.setListHead(offset);
                TModelList findTModel = null;
                SaveTModel stm = new SaveTModel();
                do {
                        findTModel = inquiry.findTModel(req);
                        if (findTModel.getTModelInfos() != null) {
                                for (int i = 0; i < findTModel.getTModelInfos().getTModelInfo().size(); i++) {
                                        boolean go = true;
                                        String owner = Common.GetOwner(findTModel.getTModelInfos().getTModelInfo().get(i).getTModelKey(), token, inquiry);
                                        if (owner!=null && !usernames.contains(owner)) {
                                                usernames.add(owner);
                                        }
                                        if (myitemsonly) {
                                                if (owner == null || !owner.equalsIgnoreCase(username)) {
                                                        go = false;
                                                }
                                        }
                                        if (go) {
                                                if (owner!=null)
                                                      mapping.setProperty(findTModel.getTModelInfos().getTModelInfo().get(i).getTModelKey(), owner);
                                                System.out.println("Exporting " + findTModel.getTModelInfos().getTModelInfo().get(i).getTModelKey() + " owner " + owner);
                                                stm.getTModel().add(GetTmodel(findTModel.getTModelInfos().getTModelInfo().get(i), token));
                                        }
                                }
                        }
                        offset = offset + maxrows;
                        req.setListHead(offset);
                } while (false);//findTModel.getListDescription().getIncludeCount() > 0);
               
                if (stripSig) {
                        int x=0;
                        for (int i = 0; i < stm.getTModel().size(); i++) {
                                x+=stm.getTModel().get(i).getSignature().size();
                                stm.getTModel().get(i).getSignature().clear();
                        }
                        System.out.println(x + " signatures stripped");
                }
               
                System.out.println("Storing to disk ");
                JAXB.marshal(stm, fos);
                fos.close();
                System.out.println("Done with tModels. Export count: " + stm.getTModel().size());
        }
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.SaveTModel

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.