Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.ServiceBinding


        AccessPoint accessPoint = objectFactory.createAccessPoint();
                accessPoint.setURLType(getURLType(accessuri));
        accessPoint.setValue(accessuri);
                bt.setAccessPoint(accessPoint);
            }
            ServiceBinding sb = serviceBinding.getTargetBinding();
      if (sb != null) {
        HostingRedirector red = objectFactory.createHostingRedirector();
                Key key = sb.getKey();
        if (key != null && key.getId() != null) {
          red.setBindingKey(key.getId());
                } else {
                    red.setBindingKey("");
                }
View Full Code Here


            bt = objectFactory.createBindingTemplates();
            Iterator iter = serviceBindings.iterator();
            int currLoc = 0;
            BindingTemplate[] bindingTemplateArray = new BindingTemplate[serviceBindings.size()];
            while(iter.hasNext()) {
                ServiceBinding sb = (ServiceBinding)iter.next();
                bindingTemplateArray[currLoc] = getBindingTemplateFromJAXRSB(sb);
                currLoc++;
            }
            if (bindingTemplateArray != null) {
                bt.getBindingTemplate().addAll(Arrays.asList(bindingTemplateArray));
View Full Code Here

  }

  public static ServiceBinding getServiceBinding(BindingTemplate businessTemplate, LifeCycleManager lifeCycleManager)
  throws JAXRException
  {
    ServiceBinding serviceBinding = new ServiceBindingImpl(lifeCycleManager);

    String keystr = businessTemplate.getServiceKey();
    if (keystr != null)
    {
      Service svc = new ServiceImpl(lifeCycleManager);
      svc.setKey(lifeCycleManager.createKey(keystr));
      ((ServiceBindingImpl)serviceBinding).setService(svc);
    }
    String bindingKey = businessTemplate.getBindingKey();
    if(bindingKey != null) serviceBinding.setKey(new KeyImpl(bindingKey));

    //Access URI
    AccessPoint access = businessTemplate.getAccessPoint();
    if (access != null) serviceBinding.setAccessURI(access.getValue());

    //Description
    Description desc = null;
    if (businessTemplate.getDescription().size()>0) desc = businessTemplate.getDescription().get(0);
    if (desc!=null) {
      serviceBinding.setDescription(new InternationalStringImpl(desc.getValue()));
    }
    /**Section D.10 of JAXR 1.0 Specification */

    TModelInstanceDetails details = businessTemplate.getTModelInstanceDetails();
    List<TModelInstanceInfo> tmodelInstanceInfoList = details.getTModelInstanceInfo();

    for (TModelInstanceInfo info: tmodelInstanceInfoList)
    {
      if (info!=null && info.getInstanceDetails()!=null) {
        InstanceDetails idetails = info.getInstanceDetails();
        Collection<ExternalLink> elinks = getExternalLinks(idetails.getOverviewDoc(),lifeCycleManager);
        SpecificationLink slink = new SpecificationLinkImpl(lifeCycleManager);
        slink.addExternalLinks(elinks);
        serviceBinding.addSpecificationLink(slink);

        ConceptImpl c = new ConceptImpl(lifeCycleManager);
        c.setExternalLinks(elinks);
        c.setKey(lifeCycleManager.createKey(info.getTModelKey()));
        c.setName(lifeCycleManager.createInternationalString(idetails.getInstanceParms()));
        c.setValue(idetails.getInstanceParms());

        slink.setSpecificationObject(c);
      }
    }

    HostingRedirector hr = businessTemplate.getHostingRedirector();
    if(hr != null)
    {
      ServiceBinding sb = lifeCycleManager.createServiceBinding();
      sb.setKey(new KeyImpl(hr.getBindingKey()));
      serviceBinding.setTargetBinding(sb);
    }

    return serviceBinding;
  }
View Full Code Here

               
                LinkedHashSet<ServiceBinding> col = new LinkedHashSet<ServiceBinding>();

                for (int i=0; bindarr != null && i < bindarr.length; i++) {
                    BindingTemplate si = bindarr[i];
                    ServiceBinding sb =  ScoutUddiJaxrHelper.getServiceBinding(si,
                            registryService.getBusinessLifeCycleManager());
                    col.add(sb);
                   //Fill the Service object by making a call to registry
                   Service s = (Service)getRegistryObject(serviceKey.getId(), LifeCycleManager.SERVICE);
                   ((ServiceBindingImpl)sb).setService(s);
View Full Code Here

               Collection templates =
                  detail.getBindingTemplate();
               Iterator iter = templates.iterator();
               while (iter.hasNext()){
                   ServiceBinding binding =
                   mapper.bindingTemplate2ServiceBinding((BindingTemplate)iter.next());
                   if (type.equals(mapper.FIND))
                       fbResponse.add(binding);
                   else
                       fbResponse.add(binding.getKey());
               }
               bResponse.setCollection(fbResponse);
           }
           return bResponse;
       }
View Full Code Here

TOP

Related Classes of javax.xml.registry.infomodel.ServiceBinding

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.