Class MailWrapperUtils.MessagesWrapper
java.lang.Object
org.jenkinsci.plugins.pollmailboxtrigger.mail.utils.Logger.HasLogger
org.jenkinsci.plugins.pollmailboxtrigger.mail.utils.MailWrapperUtils.MessagesWrapper
- Enclosing class:
MailWrapperUtils
Utility class for providing extra Messaging related methods!
-
Constructor Summary
ConstructorsConstructorDescriptionMessagesWrapper(Logger logger, List<javax.mail.Message> messages, javax.mail.Folder folder) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()filterProperties(String[] props, String containing) javax.mail.FoldergetMessageProperties(javax.mail.Message message, String prefix, CustomProperties p) List<javax.mail.Message> static StringgetText(javax.mail.Part p) markAsRead(List<javax.mail.Message> messagez) markAsRead(javax.mail.Message... messagez) print()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
-
Constructor Details
-
MessagesWrapper
-
-
Method Details
-
getMessages
-
getFolder
public javax.mail.Folder getFolder() -
print
- Throws:
javax.mail.MessagingException
-
markAsRead
public MailWrapperUtils.MessagesWrapper markAsRead(javax.mail.Message... messagez) throws IOException, javax.mail.MessagingException - Throws:
IOExceptionjavax.mail.MessagingException
-
markAsRead
public MailWrapperUtils.MessagesWrapper markAsRead(List<javax.mail.Message> messagez) throws IOException, javax.mail.MessagingException - Throws:
IOExceptionjavax.mail.MessagingException
-
markAsRead
public MailWrapperUtils.MessagesWrapper markAsRead() throws IOException, javax.mail.MessagingException- Throws:
IOExceptionjavax.mail.MessagingException
-
getMessageProperties
public CustomProperties getMessageProperties(javax.mail.Message message, String prefix, CustomProperties p) throws javax.mail.MessagingException, IOException - Throws:
javax.mail.MessagingExceptionIOException
-
getText
-
filterProperties
-
saveAttachments
public File saveAttachments(javax.mail.Message message) throws IOException, javax.mail.MessagingException Saves all attachments to a temp directory, and returns the directory path. Null if no attachments.- Throws:
IOExceptionjavax.mail.MessagingException
-
close
public void close() throws javax.mail.MessagingException- Throws:
javax.mail.MessagingException
-