Package com.any_erp_vendor.moa.objects.resources.v1_0

Examples of com.any_erp_vendor.moa.objects.resources.v1_0.Email


      if (sDate != null && sDate.length() > 0) {
        try {
          java.util.Date d = formatter.parse(sDate);
          Calendar calendar = new GregorianCalendar();
          calendar.setTime(d);
          Date bDate = new Date("BirthDate");
          bDate.setMonth(Integer.toString(calendar.get(Calendar.MONTH)+1));
          bDate.setDay(Integer.toString(calendar.get(Calendar.DAY_OF_MONTH)));
          bDate.setYear(Integer.toString(calendar.get(Calendar.YEAR)));
          bPerson.setBirthDate(bDate);
        } catch (Exception exc) {
          org.openeai.OpenEaiObject.logger.fatal(exc.getMessage(), exc);
          bp_resultsTextArea.setText("Invalid BirthDate '" + sDate + "'  " + exc.getMessage());
          return;
View Full Code Here


      String sDate = bp_effectiveDate.getText();
      try {
        java.util.Date d = formatter.parse(sDate);
        Calendar calendar = new GregorianCalendar();
        calendar.setTime(d);
        Date effDate = new Date("EffectiveDate");
        effDate.setMonth(Integer.toString(calendar.get(Calendar.MONTH)+1));
        effDate.setDay(Integer.toString(calendar.get(Calendar.DAY_OF_MONTH)));
        effDate.setYear(Integer.toString(calendar.get(Calendar.YEAR)));
        addr.setEffectiveDate(effDate);
      } catch (Exception exc) {
        org.openeai.OpenEaiObject.logger.fatal(exc.getMessage(), exc);
        bp_resultsTextArea.setText("Invalid EffectiveDate '" + sDate + "'  " + exc.getMessage());
        return;
View Full Code Here

        // address' effective date information with it.
        // since emergency contacts don't care about effective date, we'll just use today's date.
        try {
          Calendar calendar = new GregorianCalendar();
          calendar.setTime(new java.util.Date());
          Date effDate = new Date("EffectiveDate");
          effDate.setMonth(Integer.toString(calendar.get(Calendar.MONTH)+1));
          effDate.setDay(Integer.toString(calendar.get(Calendar.DAY_OF_MONTH)));
          effDate.setYear(Integer.toString(calendar.get(Calendar.YEAR)));
          a.setEffectiveDate(effDate);
        } catch (Exception exc) {
          org.openeai.OpenEaiObject.logger.fatal(exc.getMessage(), exc);
          //        ec_textArea.setText("Invalid EffectiveDate '" + sDate + "'  " + exc.getMessage());
          return;
View Full Code Here

          break;

          // If there is one e-mail address in the list, that will become the
          // value of the e-mail address.
          case 1:
            Email emailAddress = (Email)li.next();
            email = emailAddress.getEmailAddress();
          break;

          // If there are multiple e-mail addresses in the list, uPortal can
          // store only one of them, so get any one that has the preferred
          // indicator set or take the first e-mail address in the list if
          // none are preferred.
          default:
            emailAddress = (Email)li.next();
            email = emailAddress.getEmailAddress();
            while (li.hasNext()) {
              emailAddress = (Email)li.next();
              if (emailAddress.getPreferred() != null &&
                  emailAddress.getPreferred().equalsIgnoreCase("Yes")) {

                  email = emailAddress.getEmailAddress();
              }
            }
          break;
        }
View Full Code Here

          // 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 Email object stored in the List at the selected index and populates the Email
   * form items with information contained in that Email object.
   **/
  void bp_emailList_mouseClicked(MouseEvent e)
  {
    Email p = (Email)bp_emailList.getSelectedValue();
    if (p != null) {
      bp_emailType.setSelectedItem(p.getType());
     
      //bp_phoneAreaCode.setText(p.getPhoneArea());
      bp_emailAddress.setText(p.getEmailAddress());
      bp_emailPreferred.setSelected(p.getPreferred().equals("Yes"));
      bp_emailActive.setSelected(p.getStatus().equals("Active"));
    }
   
  }
View Full Code Here

    protected void bp_emailAdd_mouseClicked(MouseEvent e)
    {
      String messageObjectName = BASIC_PERSON;
      org.openeai.OpenEaiObject.logger.info("Message Object Name is: " + messageObjectName);
      try {
        Email p = null;
        int index = bp_emailList.getSelectedIndex();
        if (index == -1) {
          BasicPerson bPerson = (BasicPerson)APP_CONFIG.getObject(messageObjectName);
          org.openeai.OpenEaiObject.logger.info("got " + messageObjectName + " from AppConfig");
          p = bPerson.newEmail();
        }
        else {
          p = (Email)bp_emailList.getSelectedValue();
        }
        p.setType((String)bp_emailType.getSelectedItem());
        //p.setPhoneArea(bp_phoneAreaCode.getText());
        p.setEmailAddress(bp_emailAddress.getText());
        if (bp_emailPreferred.isSelected()) {
          p.setPreferred("Yes");
        } else {
          p.setPreferred("No");
        }
        if (bp_emailActive.isSelected()) {
          p.setStatus("Active");
        } else {
          p.setStatus("New");
        }
       
        javax.swing.ListModel lm = bp_emailList.getModel();
        java.util.Vector vEmail = new java.util.Vector();
        for (int i=0; i<lm.getSize(); i++) {
View Full Code Here

    boolean preferredEmailUpdated = false;
   
    if (eMails != null && eMails.size() > 0) {
      // Look for preferred e-mail and update that
      for (int i = 0;i < eMails.size();i++) {
        Email email =  (Email)eMails.get(i);
        if (email.getPreferred().equalsIgnoreCase("yes")) {
          updateEmail (uid, email.getEmailAddress());
          preferredEmailUpdated = true;
          break;
        }
      }
      // If preferred e-mail wasn't found, update the first in the list
      if (!preferredEmailUpdated) {
        Email email =  (Email)eMails.get(0);
        String emailAddress = email.getEmailAddress();
        updateEmail (uid, emailAddress);
      }
    }

  }
View Full Code Here

          return null;

        // If there is one e-mail address in the list, that will become the
        // value of the e-mail address.
        case 1:
          Email emailAddress = (Email)li.next();
          return emailAddress.getEmailAddress();

        // If there are multiple e-mail addresses in the list, uPortal can
        // store only one of them, so get any one that has the preferred
        // indicator set or take the first e-mail address in the list if
        // none are preferred.
        default:
          emailAddress = (Email)li.next();
          String email = emailAddress.getEmailAddress();
          while (li.hasNext()) {
            emailAddress = (Email)li.next();
            if (emailAddress.getPreferred() != null &&
                emailAddress.getPreferred().equalsIgnoreCase("Yes")) {

                email = emailAddress.getEmailAddress();
            }
          }
          return email;
      }
  } 
View Full Code Here

        return null;

      // If there is one e-mail address in the list, that will become the
      // value of the e-mail address.
      case 1:
        Email emailAddress = (Email)li.next();
        return emailAddress.getEmailAddress();

      // If there are multiple e-mail addresses in the list, uPortal can
      // store only one of them, so get any one that has the preferred
      // indicator set or take the first e-mail address in the list if
      // none are preferred.
      default:
        emailAddress = (Email)li.next();
        String email = emailAddress.getEmailAddress();
        while (li.hasNext()) {
          emailAddress = (Email)li.next();
          if (emailAddress.getPreferred() != null &&
              emailAddress.getPreferred().equalsIgnoreCase("Yes")) {

              email = emailAddress.getEmailAddress();
          }
        }
        return email;
    }
}
View Full Code Here

TOP

Related Classes of com.any_erp_vendor.moa.objects.resources.v1_0.Email

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.