Package com.elasticinbox.core.model

Examples of com.elasticinbox.core.model.Message.addLabel()


  public void testStaleMessageIdRemoval() throws IOException, OverQuotaException
  {
    Mailbox mailbox = new Mailbox(MAILBOX);

    Message message = getDummyMessage();
    message.addLabel(ReservedLabels.NOTIFICATIONS.getId());

    MessageDAO messageDAO = dao.getMessageDAO();
    List<UUID> validMessageIds = new ArrayList<UUID>();
    List<UUID> invalidMessageIds = new ArrayList<UUID>();
View Full Code Here


    message.setFrom(al);
    message.setTo(al);
    message.setSize(1024L);
    message.setSubject("Test");
    message.setPlainBody("Test");
    message.addLabel(ReservedLabels.ALL_MAILS.getId());
   
    return message;
  }
}
View Full Code Here

          message.setLocation(URI.create(
              strSe.fromBytes(c.getValue())));
        } else if (c.getName().startsWith(CN_LABEL_PREFIX)) {
          Integer labelId = Integer
              .parseInt(c.getName().split("\\:")[1]);
          message.addLabel(labelId);
        } else if (c.getName().startsWith(CN_MARKER_PREFIX)) {
          Integer markerId = Integer
              .parseInt(c.getName().split("\\:")[1]);
          message.addMarker(Marker.fromInt(markerId));
        } else if (includeBody && c.getName().equals(CN_HTML_BODY)) {
View Full Code Here

      message.setSize(file.length()); // update message size
      in.close();

      // add labels to message
      for(Integer label : labels) {
        message.addLabel(label);
      }
     
      // add markers to message
      for(Marker marker : markers) {
        message.addMarker(marker);
View Full Code Here

      newMessage.setSize(file.length()); // update message size
      in.close();

      // add labels to message
      for(Integer label : oldMessage.getLabels()) {
        newMessage.addLabel(label);
      }

      // add markers to message
      for(Marker marker : oldMessage.getMarkers()) {
        newMessage.addMarker(marker);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.