Package org.apache.juddi.datatype.service

Examples of org.apache.juddi.datatype.service.BusinessServices


    service.addName(new Name("serviceNm"));
    service.addName(new Name("serviceNm2","en"));
    service.addDescription(new Description("service whatever"));
    service.addDescription(new Description("service whatever too","it"));

    BusinessServices services = new BusinessServices();
    services.addBusinessService(service);
    services.addBusinessService(service);

    BusinessEntity object = new BusinessEntity();
    object.setBusinessKey("6c0ac186-d36b-4b81-bd27-066a5fe0fc1f");
    object.setAuthorizedName("Guest");
    object.setOperator("jUDDI");
View Full Code Here


    service.addName(new Name("serviceNm"));
    service.addName(new Name("serviceNm2","en"));
    service.addDescription(new Description("service whatever"));
    service.addDescription(new Description("service whatever too","it"));

    BusinessServices services = new BusinessServices();
    services.addBusinessService(service);
    services.addBusinessService(service);

    BusinessEntity business = new BusinessEntity();
    business.setBusinessKey("6c0ac186-d36b-4b81-bd27-066a5fe0fc1f");
    business.setAuthorizedName("Guest");
    business.setOperator("jUDDI");
View Full Code Here

    service.addName(new Name("serviceNm"));
    service.addName(new Name("serviceNm2","en"));
    service.addDescription(new Description("service whatever"));
    service.addDescription(new Description("service whatever too","it"));

    BusinessServices object = new BusinessServices();
    object.addBusinessService(service);
    object.addBusinessService(service);

    return object;

  }
View Full Code Here

    service.addName(new org.apache.juddi.datatype.Name("serviceNm"));
    service.addName(new org.apache.juddi.datatype.Name("serviceNm2","en"));
    service.addDescription(new Description("service whatever"));
    service.addDescription(new Description("service whatever too","it"));

    BusinessServices services = new BusinessServices();
    services.addBusinessService(service);
    services.addBusinessService(service);

    BusinessEntity business = new BusinessEntity();
    business.setBusinessKey("6c0ac186-d36b-4b81-bd27-066a5fe0fc1f");
    business.setAuthorizedName("Steve Viens");
    business.setOperator("jUDDI");
View Full Code Here

      if(name != null ) org.setName(getIString(name, lcm));
      if( desc != null) org.setDescription(getIString((String)desc.getValue(), lcm));
      org.setKey(lcm.createKey(entity.getBusinessKey()));

      //Set Services also
      BusinessServices services = entity.getBusinessServices();
      Vector svect = services != null ? services.getBusinessServiceVector() : null;
      for (int i = 0; svect != null && i < svect.size(); i++)
      {
         BusinessService s = (BusinessService)svect.elementAt(i);
         org.addService(getService(s, lcm));
      }
View Full Code Here

      if( name != null ) org.setName(getIString(name, lcm));
      if( desc != null ) org.setDescription(getIString((String)desc.getValue(), lcm));
      org.setKey(lcm.createKey(entity.getBusinessKey()));

      //Set Services also
      BusinessServices services = entity.getBusinessServices();
      Vector svect = services.getBusinessServiceVector();
      for (int i = 0; svect != null && i < svect.size(); i++)
      {
         BusinessService s = (BusinessService)svect.elementAt(i);
         org.addService(getService(s, lcm));
      }
View Full Code Here

    public static BusinessEntity getBusinessEntityFromJAXROrg(Organization org)
            throws JAXRException
    {
        BusinessEntity biz = new BusinessEntity();
        BusinessServices bss = new BusinessServices();
        Vector bvect = new Vector();

        try
        {
            //It may just be an update
            Key key = org.getKey();
            if(key  != null ) biz.setBusinessKey(key.getId());
            //Lets get the Organization attributes at the top level
            String language = Locale.getDefault().getLanguage();

            biz.addName(new Name(org.getName().getValue(), language));
            biz.addDescription(new Description(org.getDescription().getValue()));
            if(org.getPrimaryContact() != null )
                biz.setAuthorizedName(org.getPrimaryContact().getPersonName().getFullName());

            Collection s = org.getServices();
            log.debug("?Org has services=" + s.isEmpty());
            Iterator iter = s.iterator();
            while (iter.hasNext())
            {
                BusinessService bs =
                        ScoutJaxrUddiHelper.getBusinessServiceFromJAXRService((Service) iter.next());
                bvect.add(bs);
            }

            /*
             * map users : JAXR has concept of 'primary contact', which is a
             * special designation for one of the users, and D6.1 seems to say
             * that the first UDDI user is the primary contact
             */

            Contacts cts = new Contacts();
            Vector cvect = new Vector();

            User primaryContact = org.getPrimaryContact();
            Collection users = org.getUsers();
           
            /*
             * first do primary, and then filter that out in the loop
             */
            if (primaryContact != null) {
                Contact ct = getContactFromJAXRUser(primaryContact);
                cvect.add(ct);
            }

            Iterator it = users.iterator();
            while (it.hasNext())
            {
                User u = (User) it.next();

                if (u != primaryContact) {
                    Contact ct = getContactFromJAXRUser(u);
                    cvect.add(ct);
                }
            }

            bss.setBusinessServiceVector(bvect);
            cts.setContactVector(cvect);
            biz.setContacts(cts);

            biz.setBusinessServices(bss);

View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.service.BusinessServices

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.