예제 #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);
 }