Package info.ineighborhood.cardme.impl

Examples of info.ineighborhood.cardme.impl.VCardImpl


   * @return the VCard
   */
  public String createVCard(IContact contact, List<VCardContactField> vcards) {
    String vcardMapping = "";
    String attributeValue = "";
    info.ineighborhood.cardme.VCard vcard = new VCardImpl();
    VCardAddress vcardAddress = new VCardAddress();
    try {
      vcard.setVersion(info.ineighborhood.cardme.VCard.VERSION_3_0);
      vcard.setRevisionDate(Calendar.getInstance());
      vcard.setTimeZone(Calendar.getInstance().getTimeZone());
      for (int i = 0; i < vcards.size(); i++) {
        attributeValue = "";
        VCardContactField card = vcards.get(i);
        String profileAttribute = card.getProfileAttribute().trim();
        if(card.isEnabled()) {
          attributeValue = this.getVcardFieldValue(contact, profileAttribute);
        }
        String code = card.getCode().trim();
        this.setVcardFields(attributeValue, code, vcard, vcardAddress);
      }
      vcard.addAddress(this.createAddress(vcardAddress, MailingAddressType.HOME_MAILING_ADDRESS));
      vcardMapping = vcard.toString();
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "createVCard");
    }
    return vcardMapping;
  }
View Full Code Here

TOP

Related Classes of info.ineighborhood.cardme.impl.VCardImpl

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.