Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.ServiceBinding


      BulkResponse bulkResponse = bqm.findServiceBindings(service.getKey(),findQualifiers,null,specs);
      if (bulkResponse.getStatus()==JAXRResponse.STATUS_SUCCESS){
        serviceBindings = (Collection<ServiceBinding>)bulkResponse.getCollection();
        for (Iterator bindIter = serviceBindings.iterator(); bindIter.hasNext();)
        {
          ServiceBinding binding = (ServiceBinding) bindIter.next();
          Collection<SpecificationLink> bindingSpecs = binding.getSpecificationLinks();         
                SpecificationLink slink = new SpecificationLinkImpl(blm);
                slink.setSpecificationObject(jbossTModel);

          bindingSpecs.add(slink);
        }
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();
    if (details != null) {
      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 =  ScoutUddiV3JaxrHelper.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

  }

  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

        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

        AccessPoint accessPoint = objectFactory.createAccessPoint();
                accessPoint.setUseType(getUseType(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

               
                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<Organization> orgs = new ArrayList<Organization>();
            Organization organization = creator.createOrganization(this.getClass().getName());
//          Add a Service
            Service service = creator.createService(this.getClass().getName());
            ServiceBinding serviceBinding = creator.createServiceBinding();
            service.addServiceBinding(serviceBinding);
            organization.addService(service);
            //Add a classification
            ClassificationScheme cs = finder.findClassificationSchemeByName(this.getClass().getName());
            Classification classification = creator.createClassification(cs);
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.