コード例 #1
0
 public String getUniqueID() {
   try {
     return searchResult.getEmailId().getUniqueID();
   } catch (MessageSearchException mse) {
     logger.debug("failed to retrieve unique message id: " + mse.getMessage(), mse);
     return null;
   }
 }
コード例 #2
0
 public String getVolumeID() {
   try {
     EmailID emailID = searchResult.getEmailId();
     Volume volume = emailID.getVolume();
     if (volume != null) {
       String volumeID = volume.getID();
       return volumeID;
     } else return null;
   } catch (MessageSearchException mse) {
     logger.debug("failed to retrieve volumeid: " + mse.getMessage(), mse);
     return null;
   }
   // return searchResult.getEmailId().getVolume().getID();
 }
コード例 #3
0
 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;
 }
コード例 #4
0
  public boolean getMessageExist() {
    try {
      EmailID emailID = searchResult.getEmailId();
      Volume volume = emailID.getVolume();
      return (volume != null);

      /*if (volume!=null) {
      	Archiver archiver = Config.getConfig().getArchiver();
      	boolean exists = archiver.isMessageExist(emailID);
      	if (!exists) {
      		logger.debug("message is not accessible on disk");
      	}
      	return exists;
      } else {
      	logger.debug("could not lookup volume. the index appears out of sync with volumeinfo ID field.");
      }*/
    } catch (Exception e) {
      logger.debug("failed to determine if message exists in store:" + e.getMessage(), e);
    }
    return false;
  }
コード例 #5
0
 public void setSelected(boolean selected) {
   logger.debug("SearchResultBean.setChecked():" + getUniqueID() + "," + selected);
   this.selected = selected;
 }