Package org.uddi.api_v2

Examples of org.uddi.api_v2.Phone


      // have to determine if we need to insert, delete or update any
      logger.info("Starting Phone update process...");
      java.util.List newPhones = newData.getPhone();
      java.util.List oldPhones = baselinePerson.getPhone();
      for (int i=0; i<newPhones.size(); i++) {
        Phone newPhone = (Phone)newPhones.get(i);
        String newPhoneKey = newPhone.getCombinedKeyValue();
        boolean foundMatch = false;
        for (int j=0; j<oldPhones.size(); j++) {
          Phone oldPhone = (Phone)oldPhones.get(j);
          String oldPhoneKey = oldPhone.getCombinedKeyValue();
          if (oldPhoneKey.equalsIgnoreCase(newPhoneKey)) {
            // found a match, might have to update...
            foundMatch = true;
            if (newPhone.equals(oldPhone) == false) {
              // need to update individual phone
              logger.info("updating existing phone object.");
              updatePhone(conn, msgCategory, msgObject, msgRelease, instId, newPhone);
            }
          }
        }
        if (foundMatch == false) {
          // need to create phone
          logger.info("creating new address object.");
          createPhone(conn, msgCategory, msgObject, msgRelease, instId, newPhone);
        }
      }
      // now we need to check the oldPhones and delete any that don't
      // exist in the newAddress list
      for (int i=0; i<oldPhones.size(); i++) {
        Phone oldPhone = (Phone)oldPhones.get(i);
        String oldPhoneKey = oldPhone.getCombinedKeyValue();
        boolean foundMatch = false;
        for (int j=0; j<newPhones.size(); j++) {
          Phone newPhone = (Phone)newPhones.get(j);
          String newPhoneKey = newPhone.getCombinedKeyValue();
          if (oldPhoneKey.equalsIgnoreCase(newPhoneKey)) {
            // found a match, don't delete
            foundMatch = true;
          }
        }
View Full Code Here


          // get the phones associated to the basic person
          java.util.List phones = bp.getPhone();
          java.util.Vector vPhone = new java.util.Vector();
          if (phones.size() > 0) {
            for (int j=0; j<phones.size(); j++) {
              Phone p = bp.getPhone(j);
              vPhone.add(p);
            }
          }
          bp_phoneList.setListData(vPhone);
          bp_phoneList.updateUI();
          // get the emails associated to the basic person
          java.util.List emails = bp.getEmail();
          java.util.Vector vEmail = new java.util.Vector();
          if (emails.size() > 0) {
            for (int j=0; j<emails.size(); j++) {
              Email p = bp.getEmail(j);
              vEmail.add(p);
              org.openeai.OpenEaiObject.logger.info("Email="+p.toXmlString());
            }
          }
          bp_emailList.setListData(vEmail);
          bp_emailList.updateUI();
         
View Full Code Here

   * Retrieves the Phone object stored in the List at the selected index and populates the Phone
   * form items with information contained in that Phone object.
   **/
  void bp_phoneList_mouseClicked(MouseEvent e)
  {
    Phone p = (Phone)bp_phoneList.getSelectedValue();
    if (p != null) {
      bp_phoneType.setSelectedItem(p.getType());
     
      bp_phoneAreaCode.setText(p.getPhoneArea());
      bp_phoneNumber.setText(p.getPhoneNumber());
    }
   
  }
View Full Code Here

        deleteAddress(conn, msgCategory, msgObject, msgRelease, instId, a);
      }

      // now the phone(s), using the same connection
      for (int i=0; i<bPerson.getPhone().size(); i++) {
        Phone phone = bPerson.getPhone(i);
        deletePhone(conn, msgCategory, msgObject, msgRelease, instId, phone);
      }

      // now the email(s), using the same connection
View Full Code Here

    protected void bp_phoneAdd_mouseClicked(MouseEvent e)
    {
      String messageObjectName = BASIC_PERSON;
      org.openeai.OpenEaiObject.logger.info("Message Object Name is: " + messageObjectName);
      try {
        Phone p = null;
        int index = bp_phoneList.getSelectedIndex();
        if (index == -1) {
          BasicPerson bPerson = (BasicPerson)APP_CONFIG.getObject(messageObjectName);
          org.openeai.OpenEaiObject.logger.info("got " + messageObjectName + " from AppConfig");
          p = bPerson.newPhone();
        }
        else {
          p = (Phone)bp_phoneList.getSelectedValue();
        }
        p.setType((String)bp_phoneType.getSelectedItem());
        p.setPhoneArea(bp_phoneAreaCode.getText());
        p.setPhoneNumber(bp_phoneNumber.getText());
       
        javax.swing.ListModel lm = bp_phoneList.getModel();
        java.util.Vector vPhones = new java.util.Vector();
        for (int i=0; i<lm.getSize(); i++) {
          vPhones.add(lm.getElementAt(i));
View Full Code Here

        createAddress(conn, msgCategory, msgObject, msgRelease, instId, a);
      }

      // now the phone(s), using the same connection
      for (int i=0; i<bPerson.getPhone().size(); i++) {
        Phone phone = bPerson.getPhone(i);
        createPhone(conn, msgCategory, msgObject, msgRelease, instId, phone);
      }

      // now the email(s), using the same connection
View Full Code Here

        ec_street1.setText(a.getStreet1());
        ec_city.setText(a.getCityOrLocality());
        ec_stateList.setSelectedItem(a.getStateOrProvince());
        ec_zip.setText(a.getZipOrPostalCode());
      }
      Phone p = ec.getPhone();
      if (p != null) {
        ec_phone.setText(p.getPhoneNumber());
      }
     
    }
View Full Code Here

        a.setStateOrProvince((String)ec_stateList.getSelectedItem());
        a.setZipOrPostalCode(ec_zip.getText());
        ec.setAddress(a);
       
        if (ec_phone.getText() != null && ec_phone.getText().length() > 0) {
          Phone p = ec.newPhone();
          ec_phone.setText(p.getPhoneNumber());
          ec.setPhone(p);
        }
      }
      catch (Exception e) {
        org.openeai.OpenEaiObject.logger.fatal(e.getMessage(), e);
View Full Code Here

  }
 
  protected void updatePhone (String uid, List phones) {
    for (int i = 0;i < phones.size();i++) {
      Phone phone = (Phone)phones.get(i);
      String phoneType = phone.getType();
      String phoneNumber = phone.getPhoneArea() + "-" + phone.getPhoneNumber();
      logger.debug("[" + getServiceName() + ".updatePhone] Modifying the phone " + phoneType + "to " + phoneNumber + " for user " + uid + ".");

    }
  }
View Full Code Here

          }
          List phoneList = bp.getPhone();
          phoneList.clear();
          if (phoneType!=null) {
            for (int i=0;i<phoneType.length;i++) {
              Phone phone=bp.newPhone();
              phone.setType(phoneType[i]);
              phone.setPhoneArea(phoneAreacode[i]);
              phone.setPhoneNumber(phoneNumber[i]);
              phoneList.add(phone);
            }
            bp.setPhone(phoneList);
          }
          List emailList = bp.getEmail();
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.Phone

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.