Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.Service


    */
   protected Organization createOrganization(String orgname) throws JAXRException
   {
      Organization org = blm.createOrganization(getIString(orgname));
      org.setDescription(getIString("JBoss Inc"));
      Service service = blm.createService(getIString("JBOSS JAXR Service"));
      service.setDescription(getIString("Services of XML Registry"));
      //Create serviceBinding
      ServiceBinding serviceBinding = blm.createServiceBinding();
      serviceBinding.setDescription(blm.createInternationalString("Service Binding"));

      //Turn validation of URI off
      serviceBinding.setValidateURI(false);
      serviceBinding.setAccessURI("http://testjboss.org");

      // Add the serviceBinding to the service
      service.addServiceBinding(serviceBinding);

      User user = blm.createUser();
      org.setPrimaryContact(user);
      PersonName personName = blm.createPersonName("Anil S");
      TelephoneNumber telephoneNumber = blm.createTelephoneNumber();
View Full Code Here


        }

    }

    public void testCreateObjectService() throws JAXRException {
        Service service = (Service) manager.createObject(LifeCycleManager.SERVICE);
        assertEquals(ServiceImpl.class, service.getClass());
        assertSame(manager, service.getLifeCycleManager());
    }
View Full Code Here

    {
        // Display service and binding information
        Collection services = org.getServices();
        for (Iterator svcIter = services.iterator(); svcIter.hasNext();)
        {
            Service svc = (Service) svcIter.next();
            System.out.println(" Service name: " + getName(svc));
            System.out.println(" Service description: " + getDescription(svc));
            Collection serviceBindings = svc.getServiceBindings();
            for (Iterator sbIter = serviceBindings.iterator(); sbIter.hasNext();)
            {
                ServiceBinding sb = (ServiceBinding) sbIter.next();
                System.out.println("  Binding Description: " + getDescription(sb));
                System.out.println("  Access URI: " + sb.getAccessURI());
View Full Code Here

    {
        // Display service and binding information
        Collection services = org.getServices();
        for (Iterator svcIter = services.iterator(); svcIter.hasNext();)
        {
            Service svc = (Service) svcIter.next();
            System.out.println(" Service name: " + getName(svc));
            System.out.println(" Service description: " + getDescription(svc));
            Collection serviceBindings = svc.getServiceBindings();
            for (Iterator sbIter = serviceBindings.iterator(); sbIter.hasNext();)
            {
                ServiceBinding sb = (ServiceBinding) sbIter.next();
                System.out.println("  Binding Description: " + getDescription(sb));
                System.out.println("  Access URI: " + sb.getAccessURI());
View Full Code Here

   {
      // Display service and binding information
      Collection services = org.getServices();
      for (Iterator svcIter = services.iterator(); svcIter.hasNext();)
      {
         Service svc = (Service)svcIter.next();
         log.debug(" Service name: " + getName(svc));
         log.debug(" Service description: " + getDescription(svc));

         assertEquals("JBOSS JAXR Service", getName(svc));
         assertEquals("Services of XML Registry", getDescription(svc));

         Collection serviceBindings = svc.getServiceBindings();
         for (Iterator sbIter = serviceBindings.iterator(); sbIter.hasNext();)
         {
            ServiceBinding sb = (ServiceBinding)sbIter.next();
            log.debug("  Binding Description: " + getDescription(sb));
            log.debug("  Access URI: " + sb.getAccessURI());
View Full Code Here

    */
   protected Organization createOrganization(String orgname) throws JAXRException
   {
      Organization org = blm.createOrganization(getIString(orgname));
      org.setDescription(getIString("JBoss Inc"));
      Service service = blm.createService(getIString("JBOSS JAXR Service"));
      service.setDescription(getIString("Services of XML Registry"));
      //Create serviceBinding
      ServiceBinding serviceBinding = blm.createServiceBinding();
      serviceBinding.setDescription(blm.createInternationalString("Test Service Binding"));

      //Turn validation of URI off
      serviceBinding.setValidateURI(false);
      serviceBinding.setAccessURI("http://testjboss.org");

      // Add the serviceBinding to the service
      service.addServiceBinding(serviceBinding);

      User user = blm.createUser();
      org.setPrimaryContact(user);
      PersonName personName = blm.createPersonName("Anil S");
      TelephoneNumber telephoneNumber = blm.createTelephoneNumber();
View Full Code Here

            }
      // TODO:Need to look further at the mapping b/w BindingTemplate and
      // Jaxr ServiceBinding

      // Get Service information
           Service svc = serviceBinding.getService();
      if (svc != null && svc.getKey() != null && svc.getKey().getId() != null) {
              bt.setServiceKey(svc.getKey().getId());
           }
     
      InternationalString idesc = serviceBinding.getDescription();
           
            addDescriptions(bt.getDescription(), idesc);
View Full Code Here

  }

  public static Service getService(BusinessService businessService, LifeCycleManager lifeCycleManager)
  throws JAXRException
  {
    Service serve = new ServiceImpl(lifeCycleManager);

    String keystr = businessService.getServiceKey();

    if (keystr != null)
    {
      serve.setKey(lifeCycleManager.createKey(keystr));
    }

    Name n = null;
    if (businessService.getName().size()>0) n = businessService.getName().get(0);

    if (n != null) {
      String name = n.getValue();
      serve.setName(lifeCycleManager.createInternationalString(getLocale(n.getLang()), name));
    }

    Description desc =null;
    if (businessService.getDescription().size()>0) desc = businessService.getDescription().get(0);
    if (desc != null ) {
      serve.setDescription(lifeCycleManager.createInternationalString(getLocale(desc.getLang()), desc.getValue()));
    }

    //Populate the ServiceBindings for this Service
    BindingTemplates bts = businessService.getBindingTemplates();
    List<BindingTemplate> bindingTemplateList = bts.getBindingTemplate();
    for (BindingTemplate bindingTemplate : bindingTemplateList) {
      serve.addServiceBinding(getServiceBinding(bindingTemplate, lifeCycleManager));
    }
    serve.addClassifications(getClassifications(businessService.getCategoryBag(), lifeCycleManager));

    return serve;
  }
View Full Code Here

  }

  public static Service getService(ServiceInfo serviceInfo, LifeCycleManager lifeCycleManager)
  throws JAXRException
  {
    Service service = new ServiceImpl(lifeCycleManager);

    String keystr = serviceInfo.getServiceKey();

    if (keystr != null)
    {
      service.setKey(lifeCycleManager.createKey(keystr));
    }

    Name n = null;
    if (serviceInfo.getName().size()>0) n = serviceInfo.getName().get(0);
    if (n != null) {
      String name = n.getValue();
      service.setName(lifeCycleManager.createInternationalString(getLocale(n.getLang()), name));
    }
    return service;
  }
View Full Code Here

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

TOP

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

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.