|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.forum.mail.MessageUtils
public class MessageUtils
Utility functions for reading Message data.
| Field Summary | |
|---|---|
static java.lang.String |
ENABLED_TOKEN
Token string used in freemarker templates to determing if email reply to watches is enabled. |
static java.lang.String |
END_TOKEN
Token string used to detect the end of template text when parsing incoming mail. |
| Constructor Summary | |
|---|---|
MessageUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
addressArrayToString(javax.mail.Address[] addresses)
Returns the first address in the supplied array as a String. |
static java.lang.String |
addressToString(javax.mail.Address address)
Converts an Address to a String. |
static int |
getIndexAfterEndToken(java.lang.String messageBody)
Returns the position in the suppled string past the last occurrence of the template end token. |
static java.util.List |
getMessageAttachments(javax.mail.Message message)
If the supplied Message has a mimetype matching the pattern multipart/*, all parts will be looped
through in search of attachment data. |
static java.lang.String |
getMessageBodyText(javax.mail.Part message)
Reads the supplied Part and returns its body text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String END_TOKEN
public static final java.lang.String ENABLED_TOKEN
| Constructor Detail |
|---|
public MessageUtils()
| Method Detail |
|---|
public static java.lang.String getMessageBodyText(javax.mail.Part message)
throws javax.mail.MessagingException,
java.io.IOException,
EmailMonitorException
Part and returns its body text.
message - the Part to read.
javax.mail.MessagingException
java.io.IOException
EmailMonitorException
public static java.util.List getMessageAttachments(javax.mail.Message message)
throws javax.mail.MessagingException,
java.io.IOException
Message has a mimetype matching the pattern multipart/*, all parts will be looped
through in search of attachment data. A List of AttachmentData objects is returned with the results.
message - the message to search for attachments.
List of AttachmentData objects representing all attachments.
javax.mail.MessagingException - if accessing message data fails.
java.io.IOException - if reading message data fails.public static java.lang.String addressToString(javax.mail.Address address)
Address to a String.
address - the address to convert.
public static java.lang.String addressArrayToString(javax.mail.Address[] addresses)
addresses - the array of Address to return as a string.
public static int getIndexAfterEndToken(java.lang.String messageBody)
messageBody - the body of the message to scan.
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||