/** * Returns EMail object with the specified value. * * @param value the string containing the description. * @return EMail */ public EMail createEMail(String value) { EmailField emailImpl = new EmailField(); try { emailImpl.setValue(value); } catch (SdpException s) { s.printStackTrace(); } return emailImpl; }
public List<DisplayField> getFieldValues() { ArrayList<DisplayField> list = new ArrayList<DisplayField>(); EmailFields emailFields = Config.getConfig().getEmailFields(); for (EmailField field : emailFields.getAvailableFields().values()) { if (field.getShowInResults() != EmailField.ShowInResults.NORESULTS) { try { EmailFieldValue efv = searchResult.getFieldValue(field.getName()); list.add(DisplayField.getDisplayField(efv, locale, false)); } catch (MessageSearchException mse) { logger.debug("failed to retrieve field value from message: " + mse.getMessage()); } } } return list; }