Package org.apache.juddi.datatype.business

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


    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


    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);
    contacts.addContact(contact);
View Full Code Here

      statement.setString(1, businessKey.toString());

      int listSize = contactList.size();
      for (int contactID = 0; contactID < listSize; contactID++)
      {
        Contact contact = (Contact) contactList.elementAt(contactID);

        statement.setInt(2, contactID);
        statement.setString(3, contact.getUseType());
        statement.setString(4, contact.getPersonNameValue());

        log.debug(
          "insert into CONTACT table:\n\n\t"
            + insertSQL
            + "\n\t BUSINESS_KEY="
            + businessKey.toString()
            + "\n\t CONTACT_ID="
            + contactID
            + "\n\t USE_TYPE="
            + contact.getUseType()
            + "\n\t PERSON_NAME="
            + contact.getPersonNameValue()
            + "\n");

        statement.executeUpdate();
      }
    }
View Full Code Here

      // execute the statement
      resultSet = statement.executeQuery();
      while (resultSet.next())
      {
        Contact contact = new Contact();
        contact.setUseType(resultSet.getString(1));//("USE_TYPE"));
        contact.setPersonNameValue(resultSet.getString(2));//("PERSON_NAME"));
        contactList.add(contact);
      }

      return contactList;
    }
View Full Code Here

        business.setBusinessKey(businessKey);
        business.setAuthorizedName("sviens");
        business.setOperator("www.jUDDI.org");

        Vector contactList = new Vector();
        Contact contact = null;

        contact = new Contact("Steve Viens");
        contact.setUseType("sales");
        contactList.add(contact);

        contact = new Contact("Marley Viens");
        contact.setUseType("support");
        contactList.add(contact);

        contact = new Contact("Chris Michaels");
        contact.setUseType("marketing");
        contactList.add(contact);

        String authorizedUserID = "sviens";

        // begin a new transaction
View Full Code Here

            // insert the BusinessEntity's Contact Phone, Address and Email Info
            int listSize = contactVector.size();
            for (int contactID=0; contactID<listSize; contactID++)
            {
              Contact contact = (Contact)contactVector.elementAt(contactID);
              ContactDescTable.insert(businessKey,contactID,contact.getDescriptionVector(),connection);
              EmailTable.insert(businessKey,contactID,contact.getEmailVector(),connection);
              PhoneTable.insert(businessKey,contactID,contact.getPhoneVector(),connection);

              // insert the Contact's AddressLine objects
              Vector addrList = contact.getAddressVector();
              if ((addrList != null) && (addrList.size() > 0))
              {
                AddressTable.insert(businessKey,contactID,addrList,connection);
                for (int addrID=0; addrID<addrList.size(); addrID++)
                {
View Full Code Here

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    Contact contact = (Contact)object;
    Element element = parent.getOwnerDocument().createElement(TAG_NAME);
    AbstractHandler handler = null;

    String useType = contact.getUseType();
    if ((useType != null) && (useType.trim().length() > 0))
      element.setAttribute("useType",useType);

    Vector descrVector = contact.getDescriptionVector();
    if ((descrVector!=null) && (descrVector.size() > 0))
    {
      handler = maker.lookup(DescriptionHandler.TAG_NAME);
      for (int i=0; i < descrVector.size(); i++)
        handler.marshal((Description)descrVector.elementAt(i),element);
    }

    PersonName personName = contact.getPersonName();
    if ((personName != null))
    {
      handler = maker.lookup(PersonNameHandler.TAG_NAME);
      handler.marshal(personName,element);
    }

    Vector phoneVector = contact.getPhoneVector();
    if ((phoneVector!=null) && (phoneVector.size() > 0))
    {
      handler = maker.lookup(PhoneHandler.TAG_NAME);
      for (int i=0; i < phoneVector.size(); i++)
        handler.marshal((Phone)phoneVector.elementAt(i),element);
    }

    Vector emailVector = contact.getEmailVector();
    if ((emailVector!=null) && (emailVector.size() > 0))
    {
      handler = maker.lookup(EmailHandler.TAG_NAME);
      for (int i=0; i < emailVector.size(); i++)
        handler.marshal((Email)emailVector.elementAt(i),element);
    }

    Vector addressVector = contact.getAddressVector();
    if ((addressVector!=null) && (addressVector.size() > 0))
    {
      handler = maker.lookup(AddressHandler.TAG_NAME);
      for (int i=0; i < addressVector.size(); i++)
        handler.marshal((Address)addressVector.elementAt(i),element);
View Full Code Here

        // 'select' the BusinessEntity's Contact objects
        Vector contactList = ContactTable.select(businessKey,connection);
        for (int contactID=0; contactID<contactList.size(); contactID++)
        {
          Contact contact = (Contact)contactList.elementAt(contactID);
          contact.setPhoneVector(PhoneTable.select(businessKey,contactID,connection));
          contact.setEmailVector(EmailTable.select(businessKey,contactID,connection));

          Vector addressList = AddressTable.select(businessKey,contactID,connection);
          for (int addressID=0; addressID<addressList.size(); addressID++)
          {
            Address address = (Address)addressList.elementAt(addressID);
            address.setAddressLineVector(AddressLineTable.select(businessKey,contactID,addressID,connection));
          }
          contact.setAddressVector(addressList);
        }

        Contacts contacts = new Contacts();
        contacts.setContactVector(contactList);
        business.setContacts(contacts);
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);

    System.out.println();

    RegistryObject regObject = contact;
    handler.marshal(regObject,parent);
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

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.