Package org.uddi.api_v2

Examples of org.uddi.api_v2.TModel


    sp.getPublisher().add(p);
    sp.setAuthInfo(rootAuthToken.getAuthInfo());
    juddiApi.savePublisher(sp);
   
    //Joe should have a keyGenerator
    TModel keyGenerator = new TModel();
    keyGenerator.setTModelKey("uddi:uddi.joepublisher.com:keygenerator");
    Name name = new Name();
    name.setValue("Joe Publisher's Key Generator");
    keyGenerator.setName(name);
    Description description = new Description();
    description.setValue("This is the key generator for Joe Publisher's UDDI entities!");
    keyGenerator.getDescription().add(description);
    OverviewDoc overviewDoc = new OverviewDoc();
    OverviewURL overviewUrl = new OverviewURL();
    overviewUrl.setUseType("text");
    overviewUrl.setValue("http://uddi.org/pubs/uddi_v3.htm#keyGen");
    overviewDoc.setOverviewURL(overviewUrl);
    keyGenerator.getOverviewDoc().add(overviewDoc);
    CategoryBag categoryBag = new CategoryBag();
    KeyedReference keyedReference = new KeyedReference();
    keyedReference.setKeyName("uddi-org:types:keyGenerator");
    keyedReference.setKeyValue("keyGenerator");
    keyedReference.setTModelKey("uddi:uddi.org:categorization:types");
    categoryBag.getKeyedReference().add(keyedReference);
    keyGenerator.setCategoryBag(categoryBag);
    clerk.register(keyGenerator);
  }
View Full Code Here


                        //or thrown some fancy dialog box
                        clerk.setPublisher("uddi");     //username
                        clerk.setPassword("uddi");     //pass
                       

                        TModel keygen = UDDIClerk.createKeyGenator("www.mycoolcompany.com", "My Company's Keymodel generator", "en");
                        clerk.register(keygen);
                        System.out.println("Creation of Partition Success!");


                        //Now lets make a few tModels using the new domain
                        TModel tm = new TModel();
                        tm.setName(new Name());
                        tm.getName().setValue("My Company's Department");
                        tm.getName().setLang("en");
                        tm.setTModelKey("uddi:www.mycoolcompany.com:department");
                        clerk.register(tm);
                        System.out.println("Creation of tModel Department Success!");

                        tm = new TModel();
                        tm.setName(new Name());
                        tm.getName().setValue("My Company's Authentication Method");
                        tm.getName().setLang("en");
                        tm.setTModelKey("uddi:www.mycoolcompany.com:authmode");
                        clerk.register(tm);
                        System.out.println("Creation of tModel Auth Mode Success!");

                        clerk.discardAuthToken();
                } catch (Exception e) {
View Full Code Here

                        //  CategoryBag/KR for the below fixed values
                        //  a tModelKey that starts with uddi:<something>:keygenerator - all lower case
                        //First, Here's the long way to do it to make a Key Generator tModel.
                        SaveTModel st = new SaveTModel();
                        st.setAuthInfo(key);
                        TModel tm = new TModel();
                        tm.setName(new Name());
                        tm.getName().setValue("My Company's Keymodel generator");
                        tm.getName().setLang("en");
                        tm.setCategoryBag(new CategoryBag());
                        KeyedReference kr = new KeyedReference();
                        kr.setTModelKey("uddi:uddi.org:categorization:types");
                        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!");

                        //Here's the easy and fun way!
                        TModel keygen = UDDIClerk.createKeyGenator("www.mycoolcompany.com", "My Company's Keymodel generator", "en");
                        //st = new SaveTModel();
                        //st.setAuthInfo(key);
                        //st.getTModel().add(keygen);
                        //saveTModel = publish.saveTModel(st);
                       

                        //Now lets make a few tModels using the new domain
                        tm = new TModel();
                        tm.setName(new Name());
                        tm.getName().setValue("My Company's Department");
                        tm.getName().setLang("en");
                        tm.setTModelKey("uddi:www.mycoolcompany.com:department");
                        st.getTModel().add(tm);
                        saveTModel = publish.saveTModel(st);
                        System.out.println("Creation of tModel Department Success!");

                        tm = new TModel();
                        tm.setName(new Name());
                        tm.getName().setValue("My Company's Authentication Method");
                        tm.getName().setLang("en");
                        tm.setTModelKey("uddi:www.mycoolcompany.com:authmode");
                        st.getTModel().add(tm);
View Full Code Here

                                }

                        }
                }

                TModel keygen = UDDIClerk.createKeyGenator("uddi:" + domain + ":keygenerator", domain, "en");
                //save the keygen
                SaveTModel stm = new SaveTModel();
                stm.setAuthInfo(token);
                stm.getTModel().add(keygen);
                System.out.println("Saving key gen " + keygen.getTModelKey());
                publish.saveTModel(stm);
                System.out.println("Saved!");

                //step three, we have two options
                //1) import the wsdl's services into a brand new business
View Full Code Here

                //first check is Mary's business exists and delete
                DeleteIfExists("uddi:uddi.marypublisher.com:marybusinessone", uddi);

                System.out.println("making mary's tmodel key gen");
                //make the key gen since our test case uses some custom keys
                TModel createKeyGenator = UDDIClerk.createKeyGenator("uddi.marypublisher.com", "mary key gen", "en");
                //clerk.register(createKeyGenator);
                System.out.println("saving...");
                SaveTM(createKeyGenator, uddi);

                System.out.println("fetching business list");
View Full Code Here

                //first check is Mary's business exists and delete
                DeleteIfExists("uddi:uddi.marypublisher.com:marybusinessone", uddi);

                System.out.println("making mary's tmodel key gen");
                //make the key gen since our test case uses some custom keys
                TModel createKeyGenator = UDDIClerk.createKeyGenator("uddi.marypublisher.com", "mary key gen", "en");
                //clerk.register(createKeyGenator);
                System.out.println("saving...");
                SaveTM(createKeyGenator, uddi);

                System.out.println("fetching business list");
View Full Code Here

                UDDIClient client = new UDDIClient("META-INF/subscription-notification-client-uddi.xml");
                UDDIClerk clerk = client.getClerk("default");
                String base = "uddi:amqptestdomain:";
                String lang = "en";

                TModel destinationType = new TModel();
                destinationType.setName(new Name("AMQP Destination Type", lang));
                destinationType.getDescription().add(new Description("topicExchange, queue, etc", lang));
                destinationType.setTModelKey(TMODEL_DESTINATION_TYPE);

                TModel destinationName = new TModel();
                destinationName.setName(new Name("AMQP Destination Name", lang));
                destinationName.getDescription().add(new Description("The name of the topic or queue", lang));
                destinationName.setTModelKey(TMODEL_DESTINATION_NAME);

                TModel createKeyGenator = UDDIClerk.createKeyGenator(base + "keygenerator", "AMQP Test Key domain", lang);
                BusinessEntity be = new BusinessEntity();
                be.setBusinessKey(base + "business");
                be.getName().add(new Name("AMQP Test callbacks", lang));
                be.setBusinessServices(new BusinessServices());
                BusinessService bs = new BusinessService();
View Full Code Here

      tx.begin();
 
      if (alreadyInstalled(em))
        new FatalErrorException(new ErrorMessage("errors.install.AlreadyInstalled"));
     
      TModel rootTModelKeyGen = (TModel)buildInstallEntity(FILE_ROOT_TMODELKEYGEN, "org.uddi.api_v3", config);
      org.uddi.api_v3.BusinessEntity rootBusinessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(FILE_ROOT_BUSINESSENTITY, "org.uddi.api_v3",config);
     
      String rootPartition = getRootPartition(rootTModelKeyGen);
      String nodeId = getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
     
View Full Code Here

      if (alreadyInstalled(config))
        new FatalErrorException(new ErrorMessage("errors.install.AlreadyInstalled"));
     
      String rootPublisherStr = config.getString(Property.JUDDI_ROOT_PUBLISHER);
      String fileRootTModelKeygen = rootPublisherStr + FILE_TMODELKEYGEN;
      TModel rootTModelKeyGen = (TModel)buildInstallEntity(fileRootTModelKeygen, "org.uddi.api_v3", config);
      String fileRootBusinessEntity = rootPublisherStr + FILE_BUSINESSENTITY;
      org.uddi.api_v3.BusinessEntity rootBusinessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileRootBusinessEntity, "org.uddi.api_v3",config);
     
      String rootPartition = getRootPartition(rootTModelKeyGen);
      String nodeId = getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
     
      String fileRootPublisher = rootPublisherStr + FILE_PUBLISHER;
      log.info("Loading the root Publisher from file " + fileRootPublisher);
      rootPublisher = installPublisher(em, fileRootPublisher, config);
     
      installRootPublisherKeyGen(em, rootTModelKeyGen, rootPartition, rootPublisher, nodeId);

      rootBusinessEntity.setBusinessKey(nodeId);
      installBusinessEntity(true, em, rootBusinessEntity, rootPublisher, rootPartition, config);
     
      List<String> juddiPublishers = getPublishers(config);
      for (String publisherStr : juddiPublishers) {
        String filePublisher = publisherStr + FILE_PUBLISHER;
        String fileTModelKeygen = publisherStr + FILE_TMODELKEYGEN;
        TModel tModelKeyGen = (TModel)buildInstallEntity(fileTModelKeygen, "org.uddi.api_v3", config);
        String fileBusinessEntity = publisherStr + FILE_BUSINESSENTITY;
        org.uddi.api_v3.BusinessEntity businessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileBusinessEntity, "org.uddi.api_v3",config);
        UddiEntityPublisher publisher = installPublisher(em, filePublisher, config);
        if (publisher==null) {
          throw new ConfigurationException("File " + filePublisher + " not found.");
View Full Code Here

      if (!seedAlways && alreadyInstalled(config))
        new FatalErrorException(new ErrorMessage("errors.install.AlreadyInstalled"));
     
      String rootPublisherStr = config.getString(Property.JUDDI_ROOT_PUBLISHER);
      String fileRootTModelKeygen = rootPublisherStr + FILE_TMODELKEYGEN;
      TModel rootTModelKeyGen = (TModel)buildInstallEntity(fileRootTModelKeygen, "org.uddi.api_v3", config);
      String fileRootBusinessEntity = rootPublisherStr + FILE_BUSINESSENTITY;
      org.uddi.api_v3.BusinessEntity rootBusinessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileRootBusinessEntity, "org.uddi.api_v3",config);
     
      String rootPartition = getRootPartition(rootTModelKeyGen);
      String nodeId = getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
     
      String fileRootPublisher = rootPublisherStr + FILE_PUBLISHER;
      log.info("Loading the root Publisher from file " + fileRootPublisher);
      rootPublisher = installPublisher(em, fileRootPublisher, config);
     
      installRootPublisherKeyGen(em, rootTModelKeyGen, rootPartition, rootPublisher, nodeId);

      rootBusinessEntity.setBusinessKey(nodeId);
      installBusinessEntity(true, em, rootBusinessEntity, rootPublisher, rootPartition, config);
     
      List<String> juddiPublishers = getPublishers(config);
      for (String publisherStr : juddiPublishers) {
        String filePublisher = publisherStr + FILE_PUBLISHER;
        String fileTModelKeygen = publisherStr + FILE_TMODELKEYGEN;
        TModel tModelKeyGen = (TModel)buildInstallEntity(fileTModelKeygen, "org.uddi.api_v3", config);
        String fileBusinessEntity = publisherStr + FILE_BUSINESSENTITY;
        org.uddi.api_v3.BusinessEntity businessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileBusinessEntity, "org.uddi.api_v3",config);
        UddiEntityPublisher publisher = installPublisher(em, filePublisher, config);
        if (publisher==null) {
          throw new ConfigurationException("File " + filePublisher + " not found.");
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.TModel

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.