示例#1
0
 public Map<String, MinigEmail> getEmails() {
   Map<String, MinigEmail> ret = new HashMap<String, MinigEmail>();
   for (String lbl : obm.getEmails().keySet()) {
     Email e = obm.getEmails().get(lbl);
     ret.put(lbl, new MinigEmail(e.getEmail()));
   }
   return ret;
 }
示例#2
0
 public MinigContact(
     String lastName,
     String firstName,
     String email,
     String function,
     String homeVoice,
     String cellVoice,
     String street,
     String zip,
     String location) {
   obm = new Contact();
   obm.setLastname(lastName);
   obm.setFirstname(firstName);
   obm.addEmail("INTERNET;X-OBM-Ref1", new Email(email));
   obm.setTitle(function);
   // TODO add missing fields
 }
示例#3
0
 @Override
 public int compareTo(MinigContact o) {
   if (obm.getUid() == o.obm.getUid()) {
     return 0;
   } else {
     return getLastname().compareToIgnoreCase(o.getLastname());
   }
 }
示例#4
0
 public void addAddress(String lbl, MinigAddress p) {
   obm.addAddress(
       lbl,
       new Address(
           p.getStreet(),
           p.getZipCode(),
           p.getExpressPostal(),
           p.getTown(),
           p.getCountry(),
           p.getState()));
 }
示例#5
0
  public String getDisplayName() {
    StringBuilder ret = new StringBuilder();

    // last filled & maybe first
    if (!empty(getLastname())) {
      ret.append(getLastname());
      if (!empty(getFirstname())) {
        ret.append(' ');
        ret.append(getFirstname());
      }
    } else if (!empty(getFirstname())) { // last empty, first filled
      ret.append(getFirstname());
    } else { // both are empty
      logger.warn(
          "contact with both first & last empty: obm.id: "
              + obm.getUid()
              + " mails: "
              + getEmails().size());
      ret.append("[John Doe] (obm.id: " + obm.getUid() + ")");
    }

    return ret.toString();
  }
示例#6
0
 public String toString() {
   return obm.toString();
 }
示例#7
0
 public void setBirthdayId(Integer birthdayId) {
   obm.setBirthdayId(birthdayId);
 }
示例#8
0
 public void setAssistant(String assistant) {
   obm.setAssistant(assistant);
 }
示例#9
0
 public void setUid(Integer uid) {
   obm.setUid(uid);
 }
示例#10
0
 public void setComment(String comment) {
   obm.setComment(comment);
 }
示例#11
0
 public void createOrUpdate(Contact c) {
   logger.info("[contact " + c.getUid() + "] scheduled for solr indexing");
   ContactIndexer ci = contactIndexerFactory.createIndexer(sContact, c);
   executor.execute(ci);
 }
示例#12
0
 public void addEmail(String lbl, MinigEmail email) {
   obm.addEmail(lbl, new Email(email.getEmail()));
 }
示例#13
0
 public void addPhone(String lbl, MinigPhone p) {
   obm.addPhone(lbl, new Phone(p.getNumber()));
 }
示例#14
0
 public void setLastname(String lastname) {
   obm.setLastname(lastname);
 }
示例#15
0
 public void setManager(String manager) {
   obm.setManager(manager);
 }
示例#16
0
 public void setFirstname(String firstname) {
   obm.setFirstname(firstname);
 }
示例#17
0
 public void setEntityId(Integer entityId) {
   obm.setEntityId(entityId);
 }
示例#18
0
 public void setCompany(String company) {
   obm.setCompany(company);
 }
示例#19
0
 public void setBirthday(Date birthday) {
   obm.setBirthday(birthday);
 }
示例#20
0
 public boolean equals(Object obj) {
   return obm.equals(obj);
 }
示例#21
0
 public void setMiddlename(String middlename) {
   obm.setMiddlename(middlename);
 }
示例#22
0
 public void setCollected(boolean collected) {
   obm.setCollected(collected);
 }
示例#23
0
 public void addIMIdentifier(String lbl, MinigIM imid) {
   obm.addIMIdentifier(lbl, new InstantMessagingId(imid.getProtocol(), imid.getId()));
 }
示例#24
0
 public void setService(String service) {
   obm.setService(service);
 }
示例#25
0
 public void addWebsite(String lbl, MinigWebsite p) {
   obm.addWebsite(lbl, new Website(p.getUrl()));
 }
示例#26
0
 public void setSpouse(String spouse) {
   obm.setSpouse(spouse);
 }
示例#27
0
 public String getAka() {
   return obm.getAka();
 }
示例#28
0
 public void setSuffix(String suffix) {
   obm.setSuffix(suffix);
 }
示例#29
0
 public void delete(Contact c) {
   logger.info("[contact " + c.getUid() + "] scheduled for solr removal");
   Remover rm = new Remover(sContact, c.getUid().toString());
   executor.execute(rm);
 }
示例#30
0
 public void setTitle(String title) {
   obm.setTitle(title);
 }