Package org.apache.juddi.datatype.business

Examples of org.apache.juddi.datatype.business.Contact


        business.setBusinessKey(businessKey);
        business.setAuthorizedName("sviens");
        business.setOperator("WebServiceRegistry.com");

        Vector contactList = new Vector();
        Contact contact = new Contact("Billy Bob");
        contact.setUseType("server");
        contactList.add(contact);
        int contactID = 0;

        Vector emailList = new Vector();
        Email email = null;
View Full Code Here


    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
    contact.addDescription(new Description("obBay sIay a igBay atFay erkJay","es"));
    contact.addEmail(new Email("bob@whatever.com"));
    contact.addPhone(new Phone("(603)559-1901"));
    contact.addAddress(address);

    Contacts contacts = new Contacts();
    contacts.addContact(contact);

    BusinessService service = new BusinessService();
View Full Code Here

      Contacts contacts = entity.getContacts();
      Vector cvect = contacts != null ? contacts.getContactVector(): null;

      for (int i = 0; cvect != null && i < cvect.size(); i++)
      {
         Contact contact = (Contact)cvect.elementAt(i);
         User user = new UserImpl(null);
         String pname = contact.getPersonName().getValue();
         user.setPersonName(new PersonNameImpl(pname));

         if (i == 0)
         {
            org.setPrimaryContact(user);
View Full Code Here

       */
      Contacts contacts = entity.getContacts();
      Vector cvect = contacts != null ? contacts.getContactVector():null;
      for (int i = 0; cvect != null && i < cvect.size(); i++)
      {
         Contact contact = (Contact)cvect.elementAt(i);
         User user = new UserImpl(null);
         String pname = contact.getPersonName().getValue();
         user.setType(contact.getUseType());
         user.setPersonName(new PersonNameImpl(pname));

         if (i == 0)
         {
            org.setPrimaryContact(user);
View Full Code Here

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

     * Convert JAXR User Object to UDDI  Contact
     */
    public static Contact getContactFromJAXRUser(User user)
            throws JAXRException
    {
        Contact ct = new Contact();

        if (user == null) {
            return ct;
        }

        Vector addvect = new Vector();
        Vector phonevect = new Vector();
        Vector emailvect = new Vector();
        try
        {
            ct.setPersonName(new PersonName(user.getPersonName().getFullName()));
            ct.setUseType(user.getType());
            //Postal Address
            Collection postc = user.getPostalAddresses();
            Iterator iterator = postc.iterator();
            while (iterator.hasNext())
            {
                PostalAddress post = (PostalAddress) iterator.next();
                addvect.add(ScoutJaxrUddiHelper.getAddress(post));
            }
            //Phone Numbers
            Collection ph = user.getTelephoneNumbers(null);
            Iterator it = ph.iterator();
            while (it.hasNext())
            {
                TelephoneNumber t = (TelephoneNumber) it.next();
                Phone phone = new Phone();
                String str = t.getNumber();
                log.debug("Telephone=" + str);
                phone.setValue(str);
                // phone.setText( str );
                phonevect.add(phone);
            }

            //Email Addresses
            Collection ec = user.getEmailAddresses();
            Iterator iter = ec.iterator();
            while (iter.hasNext())
            {
                EmailAddress ea = (EmailAddress) iter.next();
                Email email = new Email();
                email.setValue(ea.getAddress());
                //email.setText( ea.getAddress() );
                email.setUseType(ea.getType());
                emailvect.add(email);
            }
            ct.setAddressVector(addvect);
            ct.setPhoneVector(phonevect);
            ct.setEmailVector(emailvect);
        } catch (Exception ud)
        {
            throw new JAXRException("Apache JAXR Impl:", ud);
        }
        return ct;
View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.business.Contact

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.