Exemplo n.º 1
0
 /**
  * Reads a mail message from the given mail node.
  *
  * @param node mail node
  * @return mail message
  * @throws MessagingException if a messaging error occurs
  * @throws RepositoryException if a repository error occurs
  * @throws IOException if an IO error occurs
  */
 private Mail getMail(Node node) throws MessagingException, RepositoryException, IOException {
   String name = Text.unescapeIllegalJcrChars(node.getName());
   MailImpl mail = new MailImpl(name, getSender(node), getRecipients(node), getMessage(node));
   mail.setState(getState(node));
   mail.setLastUpdated(getLastUpdated(node));
   mail.setErrorMessage(getError(node));
   mail.setRemoteHost(getRemoteHost(node));
   mail.setRemoteAddr(getRemoteAddr(node));
   getAttributes(node, mail);
   return mail;
 }