Package de.offis.faint.gui.facedb

Examples of de.offis.faint.gui.facedb.PersonPanel$TModel


        Iterator iter = concepts.iterator();
        int currLoc = 0;
        while (iter.hasNext()) {
            try {
                TModel en =
                  ScoutJaxrUddiV3Helper.getTModelFromJAXRConcept((Concept) iter.next());
                entityarr[currLoc] = en;
                currLoc++;
            }
            catch (ClassCastException ce) {
                throw new UnexpectedObjectException();
            }
        }
        log.debug("Method:save_concept: ENlength=" + entityarr.length);
        // Save business
        TModelDetail td = null;
        try {
            td = (TModelDetail) executeOperation(entityarr, "SAVE_TMODEL");
        }
        catch (RegistryV3Exception e) {
            exceptions.add(new SaveException(e.getLocalizedMessage()));
            bulk.setStatus(JAXRResponse.STATUS_FAILURE);
            return bulk;
        }

        List<TModel> tmodelList = td.getTModel();
        entityarr = new TModel[tmodelList.size()];
        tmodelList.toArray(entityarr);
       
        log.debug("After Saving TModel. Obtained vector size:" + entityarr != null ? entityarr.length : 0);
        for (int i = 0; entityarr != null && i < entityarr.length; i++) {
            TModel tm = (TModel) entityarr[i];
            coll.add(new KeyImpl(tm.getTModelKey()));
        }

        bulk.setCollection(coll);
        bulk.setExceptions(exceptions);
View Full Code Here


      List<TModelInfo> tiList = tInfos.getTModelInfo();
      if (tiList == null || tiList.size() == 0)
        Assert.fail("No result from find tModel operation");
      TModelInfo tiOut = tiList.get(0);
     
      TModel tmIn = (TModel)EntityCreator.buildFromDoc(TckTModel.JOE_PUBLISHER_TMODEL_XML, "org.uddi.api_v3");
     
      assertEquals(tmIn.getTModelKey(), tiOut.getTModelKey());
      assertEquals(tmIn.getName().getLang(), tiOut.getName().getLang());
      assertEquals(tmIn.getName().getValue(), tiOut.getName().getValue());

      TckValidator.checkDescriptions(tmIn.getDescription(), tiOut.getDescription());
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
      Assert.fail("No exception should be thrown.");
    }
View Full Code Here

    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

      //  a tModelKey that starts with uddi:<something>:keygenerator - recommended all lower case

            String key = GetAuthKey("uddi", "uddi", AuthStyle.UDDI_AUTH);
            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!");

            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);
            saveTModel = publish.saveTModel(st);
            System.out.println("Creation of tModel Auth Mode Success!");

View Full Code Here

        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;
      if (!alreadyInstalled) {
        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);
      } else {
        log.debug("juddi.seed.always reapplies all seed files except for the root data.");
      }
     
      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

        //Register a tModel for each portType
        for (QName qName : bindings.keySet()) {
            String localpart = qName.getLocalPart();
            String namespace = qName.getNamespaceURI();
            // Build the tModel
            TModel tModel = new TModel();
            // Set the Key
            tModel.setTModelKey(keyDomainURI + localpart);
            // Set the Name
            Name name = new Name();
            name.setLang(lang);
            name.setValue(localpart);
            tModel.setName(name);
            // Set the OverviewURL
            OverviewURL overviewURL = new OverviewURL();
            overviewURL.setUseType(AccessPointType.WSDL_DEPLOYMENT.toString());
            overviewURL.setValue(wsdlURL);
            OverviewDoc overviewDoc = new OverviewDoc();
            overviewDoc.setOverviewURL(overviewURL);
            tModel.getOverviewDoc().add(overviewDoc);
            // Set the categoryBag
            CategoryBag categoryBag = new CategoryBag();

            if (namespace != null && !"".equals(namespace)) {
                // A keyedReference with a tModelKey of the WSDL Entity Type category system and a keyValue of "binding".
                KeyedReference namespaceReference = newKeyedReference(
                        "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", namespace);
                categoryBag.getKeyedReference().add(namespaceReference);
            }

            // A keyedReference with a tModelKey of the WSDL Entity Type category system and a keyValue of "binding".
            KeyedReference typesReference = newKeyedReference(
                    "uddi:uddi.org:wsdl:types", "uddi-org:wsdl:types", "binding");
            categoryBag.getKeyedReference().add(typesReference);

            // A keyedReference with a tModelKey of the WSDL portType Reference category system and a keyValue
            // of the tModelKey that models the wsdl:portType to which the wsdl:binding relates.
            Binding binding = bindings.get(qName);
            String portTypeKey = keyDomainURI + binding.getPortType().getQName().getLocalPart();
            KeyedReference namespaceReference = newKeyedReference(
                    "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference",
                    portTypeKey);
            categoryBag.getKeyedReference().add(namespaceReference);

            //  A keyedReference with a tModelKey of the UDDI Types category system and a keyValue of
            // "wsdlSpec" for backward compatibility.
            KeyedReference typesReferenceBackwardsCompatible = newKeyedReference(
                    "uddi:uddi.org:categorization:types", "uddi-org:types", "wsdlSpec");
            categoryBag.getKeyedReference().add(typesReferenceBackwardsCompatible);

            // One or two keyedReferences as required to capture the protocol
            for (Object object : binding.getExtensibilityElements()) {
                if (SOAPBinding.class.isAssignableFrom(object.getClass())) {
                    // If the wsdl:binding contains a soap:binding extensibility element from the
                    // 'http://schemas.xmlsoap.org/wsdl/soap/' namespace then the categoryBag MUST
                    //include a keyedReference with a tModelKey of the Protocol Categorization
                    // category system and a keyValue of the tModelKey of the SOAP Protocol tModel.
                    SOAPBinding soapBinding = (SOAPBinding) object;
                    KeyedReference soapProtocol = newKeyedReference(
                            "uddi:uddi.org:wsdl:categorization:protocol", "uddi-org:protocol:soap", "uddi:uddi.org:protocol:soap");
                    categoryBag.getKeyedReference().add(soapProtocol);
                    // If the value of the transport attribute of the soap:binding element
                    // is 'http://schemas.xmlsoap.org/soap/http' then the categoryBag MUST
                    // include a keyedReference with a tModelKey of the Transport Categorization
                    // category system and a keyValue of the tModelKey of the HTTP Transport tModel.
                    if ("http://schemas.xmlsoap.org/soap/http".equals(soapBinding.getTransportURI())) {
                        KeyedReference httpTransport = newKeyedReference(
                                "uddi:uddi.org:wsdl:categorization:transport", "uddi-org:http", "uddi:uddi.org:transport:http");
                        categoryBag.getKeyedReference().add(httpTransport);
                    } else if (soapBinding.getTransportURI() != null) {
                        // TODO If the value of the transport attribute is anything else,
                        // then the bindingTemplate MUST include an additional keyedReference with a tModelKey
                        // of the Transport Categorization category system and a keyValue of the tModelKey of
                        // an appropriate transport tModel.
                        log.warn("not implemented");
                    }


                } else if (object.getClass().isInstance(HTTPBinding.class)) {

                    // If the wsdl:binding contains an http:binding extensibility element from the
                    // http://schemas.xmlsoap.org/wsdl/http/ namespace then the categoryBag MUST
                    // include a keyedReference with a tModelKey of the Protocol Categorization
                    // category system and a keyValue of the tModelKey of the HTTP Protocol tModel.
                    KeyedReference soapProtocol = newKeyedReference(
                            "uddi:uddi.org:wsdl:categorization:protocol", "uddi-org:protocol:http", "uddi:uddi.org:protocol:http");
                    categoryBag.getKeyedReference().add(soapProtocol);
                }
            }


            tModel.setCategoryBag(categoryBag);
            tModels.add(tModel);
        }
        return tModels;
    }
View Full Code Here

    public Set<TModel> createWSDLPortTypeTModels(String wsdlURL, Map<QName, PortType> portTypes) throws WSDLException {
        Set<TModel> tModels = new HashSet<TModel>();
        // Create a tModel for each portType
        for (QName qName : portTypes.keySet()) {
            // Build the tModel
            TModel tModel = new TModel();
            String localpart = qName.getLocalPart();
            String namespace = qName.getNamespaceURI();
            // Set the Key
            tModel.setTModelKey(keyDomainURI + localpart);
            // Set the Name. The uddi:name element of the tModel MUST be the value of
            // the name attribute of the wsdl:portType.
            Name name = new Name();
            name.setLang(lang);
            name.setValue(localpart);
            tModel.setName(name);
            // Set the OverviewURL. The tModel MUST contain an overviewDoc with an
            // overviewURL containing the location of the WSDL document that
            // describes the wsdl:portType.
            OverviewURL overviewURL = new OverviewURL();
            overviewURL.setUseType(AccessPointType.WSDL_DEPLOYMENT.toString());
            overviewURL.setValue(wsdlURL);
            OverviewDoc overviewDoc = new OverviewDoc();
            overviewDoc.setOverviewURL(overviewURL);
            tModel.getOverviewDoc().add(overviewDoc);
            // Create the categoryBag, The tModel MUST contain a categoryBag
            CategoryBag categoryBag = new CategoryBag();

            // the categoryBag MUST contain a keyedReference with a tModelKey of the WSDL
            // Entity Type category system and a keyValue of "portType".
            KeyedReference typesReference = newKeyedReference(
                    "uddi:uddi.org:wsdl:types", "uddi-org:wsdl:types", "portType");
            categoryBag.getKeyedReference().add(typesReference);

            // If the wsdl:portType has a targetNamespace then the categoryBag MUST also contain an
            // additional keyedReference with a tModelKey of the XML Namespace category system and a
            // keyValue of the target namespace of the wsdl:definitions element that contains the
            // wsdl:portType. If the targetNamespace is absent from the portType, a categoryBag
            // MUST NOT contain a keyedReference to the XML Namespace category system.
            if (namespace != null && !"".equals(namespace)) {
                KeyedReference namespaceReference = newKeyedReference(
                        "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", namespace);
                categoryBag.getKeyedReference().add(namespaceReference);
            }

            tModel.setCategoryBag(categoryBag);
            tModels.add(tModel);
        }
        return tModels;
    }
View Full Code Here

      tModels.addAll(createWSDLPortTypeTModels(genericWSDLURL, portTypes));
      // Create the Binding tModels
      Map<QName,Binding> bindings = (Map<QName,Binding>) wsdlDefinition.getAllBindings();
      tModels.addAll(createWSDLBindingTModels(genericWSDLURL, bindings));
      // Create the BPEL4WS tModel
      TModel bpel4WSTModel = createBPEL4WSProcessTModel(serviceName, targetNamespace, portTypes, bpelOverviewURL);
        tModels.add(bpel4WSTModel);
        // Register these tModels
        for (TModel tModel : tModels) {
        clerk.register(tModel);
      }
View Full Code Here

            GetTModelDetail findAllPortTypesForProcess = createFindAllPortTypesForProcess_1(bpel4WSTModelKey);
            TModelDetail tModelDetail = clerk.getTModelDetail(findAllPortTypesForProcess);
            if (tModelDetail!=null) {
              List<TModel> tModelPortTypeList = tModelDetail.getTModel();
              if (tModelPortTypeList!=null && tModelPortTypeList.size()>0) {
                TModel bpel4WSTModel = tModelPortTypeList.get(0);
                CategoryBag categoryBag = bpel4WSTModel.getCategoryBag();
                if (categoryBag!=null && categoryBag.getKeyedReference()!=null) {
                  List<KeyedReference> portTypeTModelKeys = new ArrayList<KeyedReference>();
                  KeyedReference namespaceRef = null;
                  for (KeyedReference keyedReference : categoryBag.getKeyedReference()) {
                    if ("uddi:uddi.org:wsdl:porttypereference".equals(keyedReference.getTModelKey()) ) {
View Full Code Here

   * @param portTypes
   * @param bpelOverviewURL
   * @return
   */
    public TModel createBPEL4WSProcessTModel(QName serviceName, String targetNamespace, Map<QName,PortType> portTypes, String bpelOverviewURL) {
      TModel tModel = new TModel();
      // Set the Key
      tModel.setTModelKey(keyDomainURI + serviceName.getLocalPart() + "Process");
      // Set the Name
      Name name = new Name();
      name.setLang("en");
      name.setValue(serviceName.getLocalPart());
      tModel.setName(name);
      // Set the OverviewURL
      OverviewURL overviewURL = new OverviewURL();
      overviewURL.setValue("http://localhost:8080/bpel-console/"); //should point to the bpel of this process, maybe in guvnor
      OverviewDoc overviewDoc = new OverviewDoc();
      overviewDoc.setOverviewURL(overviewURL);
      tModel.getOverviewDoc().add(overviewDoc);
      // Set the categoryBag
      CategoryBag categoryBag = new CategoryBag();
     
      if (targetNamespace!=null) {
        KeyedReference namespaceReference = WSDL2UDDI.newKeyedReference(
          "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", targetNamespace);
        categoryBag.getKeyedReference().add(namespaceReference);
      }
      KeyedReference typesReference = WSDL2UDDI.newKeyedReference(
          "uddi:uddi.org:bpel:types", "uddi-org:bpel:types", "process");
      categoryBag.getKeyedReference().add(typesReference);
      for (QName qName : portTypes.keySet()) {
        String portTypeKey = keyDomainURI + qName.getLocalPart();
        KeyedReference portTypeReference = WSDL2UDDI.newKeyedReference(
            "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portTypeKey);
        categoryBag.getKeyedReference().add(portTypeReference);
      }
     
      tModel.setCategoryBag(categoryBag);
     
      if (log.isDebugEnabled()) {
        log.debug(new PrintUDDI<TModel>().print(tModel));
      }
     
View Full Code Here

TOP

Related Classes of de.offis.faint.gui.facedb.PersonPanel$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.