Methods Summary |
---|
public boolean | addAddress(java.lang.String type, java.lang.String address)Adds an address to the multipart message.
|
public void | addMessagePart(MessagePart part)Attaches a MessagePart to the multipart message.
|
public java.lang.String | getAddress()Returns the "from" address associated with this message, e.g. address of
the sender. If the message is a newly created message, e.g. not a
received one, then the first "to" address is returned.
Returns null if the "from" or "to" address for the
message, dependent on the case, are not set.
Note: This design allows sending responses to a received message easily
by reusing the same Message object and just replacing the
payload. The address field can normally be kept untouched (unless the
used messaging protocol requires some special handling of the address).
|
public java.lang.String[] | getAddresses(java.lang.String type)Gets the addresses of the multipart message of the specified type (e.g.
"to", "cc", "bcc" or "from") as String . The method is not
case sensitive.
|
public java.lang.String | getHeader(java.lang.String headerField)Gets the content of the specific header field of the multipart message.
|
public MessagePart | getMessagePart(java.lang.String contentID)This method returns a MessagePart from the message that
matches the content-id passed as a parameter.
|
public MessagePart[] | getMessageParts()Returns an array of all MessagePart s of this message.
|
public java.lang.String | getStartContentId()Returns the contentId of the start MessagePart .
The start MessagePart is set in
setStartContentId(String)
|
public java.lang.String | getSubject()Gets the subject of the multipart message.
|
public boolean | removeAddress(java.lang.String type, java.lang.String address)Removes an address from the multipart message.
|
public void | removeAddresses()Removes all addresses of types "to", "cc", "bcc" from the multipart
message.
|
public void | removeAddresses(java.lang.String type)Removes all addresses of the specified type from the multipart message.
|
public boolean | removeMessagePart(MessagePart part)Removes a MessagePart from the multipart message.
|
public boolean | removeMessagePartId(java.lang.String contentID)Removes a MessagePart with the specific
contentID from the multipart message.
|
public boolean | removeMessagePartLocation(java.lang.String contentLocation)Removes MessagePart s with the specific content location
from the multipart message. All MessagePart s with the
specified contentLocation are removed.
|
public void | setAddress(java.lang.String addr)Sets the "to" address associated with this message. It works the same way
as addAddress("to", addr) . The address may be set to
null .
|
public void | setHeader(java.lang.String headerField, java.lang.String headerValue)Sets the specified header of the multipart message. The header value can
be null .
|
public void | setStartContentId(java.lang.String contentId)Sets the Content-ID of the start MessagePart of
a multipart related message. The Content-ID may be set to
null . The StartContentId is set for the
MessagePart that is used to reference the other MessageParts of the
MultipartMessage for presentation or processing purposes.
|
public void | setSubject(java.lang.String subject)Sets the Subject of the multipart message. This value can be
null .
|