org.jenkinsci.plugins.pollmailboxtrigger.mail.utils
Class MailWrapperUtils.MessagesWrapper

java.lang.Object
  extended by org.jenkinsci.plugins.pollmailboxtrigger.mail.utils.Logger.HasLogger
      extended by org.jenkinsci.plugins.pollmailboxtrigger.mail.utils.MailWrapperUtils.MessagesWrapper
Enclosing class:
MailWrapperUtils

public static class MailWrapperUtils.MessagesWrapper
extends Logger.HasLogger

Utility class for providing extra Messaging related methods!


Constructor Summary
MailWrapperUtils.MessagesWrapper(Logger logger, java.util.List<javax.mail.Message> messages, javax.mail.Folder folder)
           
 
Method Summary
 void close()
           
static java.util.List<java.lang.String> filterProperties(java.lang.String[] props, java.lang.String containing)
           
 javax.mail.Folder getFolder()
           
 CustomProperties getMessageProperties(javax.mail.Message message, java.lang.String prefix, CustomProperties p)
           
 java.util.List<javax.mail.Message> getMessages()
           
static java.lang.String getText(javax.mail.Part p)
           
 MailWrapperUtils.MessagesWrapper markAsRead()
           
 MailWrapperUtils.MessagesWrapper markAsRead(java.util.List<javax.mail.Message> messagez)
           
 MailWrapperUtils.MessagesWrapper markAsRead(javax.mail.Message... messagez)
           
 MailWrapperUtils.MessagesWrapper print()
           
 java.io.File saveAttachments(javax.mail.Message message)
          Saves all attachments to a temp directory, and returns the directory path.
 
Methods inherited from class org.jenkinsci.plugins.pollmailboxtrigger.mail.utils.Logger.HasLogger
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailWrapperUtils.MessagesWrapper

public MailWrapperUtils.MessagesWrapper(Logger logger,
                                        java.util.List<javax.mail.Message> messages,
                                        javax.mail.Folder folder)
Method Detail

getMessages

public java.util.List<javax.mail.Message> getMessages()

getFolder

public javax.mail.Folder getFolder()

print

public MailWrapperUtils.MessagesWrapper print()
                                       throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

markAsRead

public MailWrapperUtils.MessagesWrapper markAsRead(javax.mail.Message... messagez)
                                            throws java.io.IOException,
                                                   javax.mail.MessagingException
Throws:
java.io.IOException
javax.mail.MessagingException

markAsRead

public MailWrapperUtils.MessagesWrapper markAsRead(java.util.List<javax.mail.Message> messagez)
                                            throws java.io.IOException,
                                                   javax.mail.MessagingException
Throws:
java.io.IOException
javax.mail.MessagingException

markAsRead

public MailWrapperUtils.MessagesWrapper markAsRead()
                                            throws java.io.IOException,
                                                   javax.mail.MessagingException
Throws:
java.io.IOException
javax.mail.MessagingException

getMessageProperties

public CustomProperties getMessageProperties(javax.mail.Message message,
                                             java.lang.String prefix,
                                             CustomProperties p)
                                      throws javax.mail.MessagingException,
                                             java.io.IOException
Throws:
javax.mail.MessagingException
java.io.IOException

getText

public static java.lang.String getText(javax.mail.Part p)

filterProperties

public static java.util.List<java.lang.String> filterProperties(java.lang.String[] props,
                                                                java.lang.String containing)

saveAttachments

public java.io.File saveAttachments(javax.mail.Message message)
                             throws java.io.IOException,
                                    javax.mail.MessagingException
Saves all attachments to a temp directory, and returns the directory path. Null if no attachments.

Throws:
java.io.IOException
javax.mail.MessagingException

close

public void close()
           throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException