Examples of EmailAddress


Examples of net.wimpi.pim.contact.model.EmailAddress

            if (UtilValidate.isNotEmpty(telecomNumber)) {
                number.setNumber(telecomNumber.getString("areaCode") + telecomNumber.getString("contactNumber"));
                number.setWork(true); // this can be better set by checking contactMechPurposeTypeId
                communication.addPhoneNumber(number);
            }
            EmailAddress email = cmf.createEmailAddress();
            GenericValue emailAddress = PartyWorker.findPartyLatestContactMech(partyId, "EMAIL_ADDRESS", delegator);
            if (UtilValidate.isNotEmpty(emailAddress.getString("infoString"))) {
                email.setAddress(emailAddress.getString("infoString"));
                communication.addEmailAddress(email);
            }
            ContactIOFactory ciof = Pim.getContactIOFactory();
            ContactMarshaller marshaller = ciof.createContactMarshaller();
            String saveToDirectory = UtilProperties.getPropertyValue("sfa.properties", "save.outgoing.directory", "");
View Full Code Here

Examples of net.wimpi.pim.contact.model.EmailAddress

                GenericValue stateGeo = EntityUtil.getFirst(delegator.findList("Geo", condition, null, null, null, true));
                serviceCtx.put("stateProvinceGeoId", stateGeo.get("geoId"));

                Communications communications = contact.getCommunications();
                for (Iterator iter = communications.getEmailAddresses(); iter.hasNext();) {
                    EmailAddress emailAddress = (EmailAddressImpl) iter.next();
                    if (communications.isPreferredEmailAddress(emailAddress)) {
                        email = emailAddress.getAddress();
                        break;
                    } else {
                        email = emailAddress.getAddress();
                        break;
                    }
                }
                serviceCtx.put("emailAddress", email);
View Full Code Here

Examples of net.wimpi.pim.contact.model.EmailAddress

            if (UtilValidate.isNotEmpty(telecomNumber)) {
                number.setNumber(telecomNumber.getString("areaCode") + telecomNumber.getString("contactNumber"));
                number.setWork(true); // this can be better set by checking contactMechPurposeTypeId
                communication.addPhoneNumber(number);
            }
            EmailAddress email = cmf.createEmailAddress();
            GenericValue emailAddress = PartyWorker.findPartyLatestContactMech(partyId, "EMAIL_ADDRESS", delegator);
            if (UtilValidate.isNotEmpty(emailAddress.getString("infoString"))) {
                email.setAddress(emailAddress.getString("infoString"));
                communication.addEmailAddress(email);
            }
            ContactIOFactory ciof = Pim.getContactIOFactory();
            ContactMarshaller marshaller = ciof.createContactMarshaller();
            String saveToDirectory = UtilProperties.getPropertyValue("sfa.properties", "save.outgoing.directory", "");
View Full Code Here

Examples of net.wimpi.pim.contact.model.EmailAddress

                if (!isGroup) {
                    Communications communications = contact.getCommunications();
                    if (UtilValidate.isNotEmpty(communications)) {
                        for (Iterator<?> iter = communications.getEmailAddresses(); iter.hasNext();) {
                            EmailAddress emailAddress = (EmailAddressImpl) iter.next();
                            if (communications.isPreferredEmailAddress(emailAddress)) {
                                email = emailAddress.getAddress();
                                break;
                            } else {
                                email = emailAddress.getAddress();
                                break;
                            }
                        }
                        if (UtilValidate.isNotEmpty(email)) {
                            serviceCtx.put("emailAddress", email);
View Full Code Here

Examples of net.wimpi.pim.contact.model.EmailAddress

            if (UtilValidate.isNotEmpty(telecomNumber)) {
                number.setNumber(telecomNumber.getString("areaCode") + telecomNumber.getString("contactNumber"));
                number.setWork(true); // this can be better set by checking contactMechPurposeTypeId
                communication.addPhoneNumber(number);
            }
            EmailAddress email = cmf.createEmailAddress();
            GenericValue emailAddress = PartyWorker.findPartyLatestContactMech(partyId, "EMAIL_ADDRESS", delegator);
            if (UtilValidate.isNotEmpty(emailAddress.getString("infoString"))) {
                email.setAddress(emailAddress.getString("infoString"));
                communication.addEmailAddress(email);
            }
            ContactIOFactory ciof = Pim.getContactIOFactory();
            ContactMarshaller marshaller = ciof.createContactMarshaller();
            String saveToDirectory = UtilProperties.getPropertyValue("sfa.properties", "save.outgoing.directory", "");
View Full Code Here

Examples of org.apache.myfaces.tobago.example.addressbook.EmailAddress

    if (value == null) {
      return;
    }

    final EmailAddress emailAddress = (EmailAddress) value;

    Matcher matcher = LOCAL_PART_PATTERN.matcher(emailAddress.getLocalPart());
    if (!matcher.matches()) {
      throw new ValidatorException(MessageUtils.createErrorMessage(
          "validatorEmailLocalPart", facesContext));
    }

    matcher = DOMAIN_PATTERN.matcher(emailAddress.getDomain());
    if (!matcher.matches()) {
      throw new ValidatorException(MessageUtils.createErrorMessage(
          "validatorEmailDomain", facesContext));
    }
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.example.addressbook.EmailAddress

    String[] parts = reference.split("@");
    if (parts == null || parts.length != 2) {
      throw new ConverterException(MessageUtils.createErrorMessage(
          "converterEmailParts", facesContext));
    }
    return new EmailAddress(reference);
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.example.addressbook.EmailAddress

      = Pattern.compile(DOMAIN_SPEC);

  public void validate(
      FacesContext facesContext, UIComponent uiComponent, Object value)
      throws ValidatorException {
    EmailAddress emailAddress = (EmailAddress) value;

    Matcher matcher = LOCAL_PART_PATTERN.matcher(emailAddress.getLocalPart());
    if (!matcher.matches()) {
      throw new ValidatorException(MessageUtils.createErrorMessage(
          "validatorEmailLocalPart", facesContext));
    }

    matcher = DOMAIN_PATTERN.matcher(emailAddress.getDomain());
    if (!matcher.matches()) {
      throw new ValidatorException(MessageUtils.createErrorMessage(
          "validatorEmailDomain", facesContext));
    }
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.example.addressbook.EmailAddress

    }
    String[] parts = reference.split("@");
    if (parts == null || parts.length != 2) {
      throw new ConverterException(MessageUtils.createErrorMessage("converterEmailParts", facesContext));
    }
    return new EmailAddress(reference);
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.example.addressbook.EmailAddress

    String[] parts = reference.split("@");
    if (parts == null || parts.length != 2) {
      throw new ConverterException(MessageUtils.createErrorMessage(
          "converterEmailParts", facesContext));
    }
    return new EmailAddress(reference);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.