|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.mail.Multipart
javax.mail.internet.MimeMultipart
com.sun.mail.dsn.MultipartReport
public class MultipartReport
A multipart/report message content, as defined in RFC 3462. A multipart/report content is a container for mail reports of any kind, and is most often used to return a delivery status report. This class only supports that most common usage.
A MultipartReport object is a special type of MimeMultipart object with a restricted set of body parts. A MultipartReport object contains:
DeliveryStatus
object containing the
details for why the report was generated.
Field Summary | |
---|---|
protected boolean |
constructed
|
Fields inherited from class javax.mail.internet.MimeMultipart |
---|
ds, parsed |
Fields inherited from class javax.mail.Multipart |
---|
contentType, parent, parts |
Constructor Summary | |
---|---|
MultipartReport()
Construct a multipart/report object with no content. |
|
MultipartReport(javax.activation.DataSource ds)
Constructs a MultipartReport object and its bodyparts from the given DataSource. |
|
MultipartReport(java.lang.String text,
DeliveryStatus status)
Construct a multipart/report object with the specified plain text and delivery status to be returned to the user. |
|
MultipartReport(java.lang.String text,
DeliveryStatus status,
javax.mail.internet.InternetHeaders hdr)
Construct a multipart/report object with the specified plain text, delivery status, and headers from the original message to be returned to the user. |
|
MultipartReport(java.lang.String text,
DeliveryStatus status,
javax.mail.internet.MimeMessage msg)
Construct a multipart/report object with the specified plain text, delivery status, and original message to be returned to the user. |
Method Summary | |
---|---|
void |
addBodyPart(javax.mail.BodyPart part)
Adds a Part to the multipart. |
void |
addBodyPart(javax.mail.BodyPart part,
int index)
Adds a BodyPart at position index . |
DeliveryStatus |
getDeliveryStatus()
Get the delivery status associated with this multipart/report. |
javax.mail.internet.MimeMessage |
getReturnedMessage()
Get the original message that is being returned along with this multipart/report. |
java.lang.String |
getText()
Get the plain text to be presented to the user, if there is any. |
javax.mail.internet.MimeBodyPart |
getTextBodyPart()
Return the body part containing the message to be presented to the user, usually just a text/plain part. |
boolean |
removeBodyPart(javax.mail.BodyPart part)
Remove the specified part from the multipart message. |
void |
removeBodyPart(int index)
Remove the part at specified location (starting from 0). |
void |
setDeliveryStatus(DeliveryStatus status)
Set the delivery status associated with this multipart/report. |
void |
setReturnedMessage(javax.mail.internet.MimeMessage msg)
Set the original message to be returned as part of the multipart/report. |
void |
setSubType(java.lang.String subtype)
Set the subtype. |
void |
setText(java.lang.String text)
Set the message to be presented to the user as just a text/plain part containing the specified text. |
void |
setTextBodyPart(javax.mail.internet.MimeBodyPart mbp)
Set the body part containing the text to be presented to the user. |
Methods inherited from class javax.mail.internet.MimeMultipart |
---|
createInternetHeaders, createMimeBodyPart, createMimeBodyPart, getBodyPart, getBodyPart, getCount, getPreamble, isComplete, parse, setPreamble, updateHeaders, writeTo |
Methods inherited from class javax.mail.Multipart |
---|
getContentType, getParent, setMultipartDataSource, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean constructed
Constructor Detail |
---|
public MultipartReport() throws javax.mail.MessagingException
javax.mail.MessagingException
public MultipartReport(java.lang.String text, DeliveryStatus status) throws javax.mail.MessagingException
javax.mail.MessagingException
public MultipartReport(java.lang.String text, DeliveryStatus status, javax.mail.internet.MimeMessage msg) throws javax.mail.MessagingException
javax.mail.MessagingException
public MultipartReport(java.lang.String text, DeliveryStatus status, javax.mail.internet.InternetHeaders hdr) throws javax.mail.MessagingException
javax.mail.MessagingException
public MultipartReport(javax.activation.DataSource ds) throws javax.mail.MessagingException
ds
- DataSource, can be a MultipartDataSource
javax.mail.MessagingException
Method Detail |
---|
public java.lang.String getText() throws javax.mail.MessagingException
getTextBodyPart
method may be used to extract the data.
javax.mail.MessagingException
public void setText(java.lang.String text) throws javax.mail.MessagingException
javax.mail.MessagingException
public javax.mail.internet.MimeBodyPart getTextBodyPart() throws javax.mail.MessagingException
javax.mail.MessagingException
public void setTextBodyPart(javax.mail.internet.MimeBodyPart mbp) throws javax.mail.MessagingException
javax.mail.MessagingException
public DeliveryStatus getDeliveryStatus() throws javax.mail.MessagingException
javax.mail.MessagingException
public void setDeliveryStatus(DeliveryStatus status) throws javax.mail.MessagingException
javax.mail.MessagingException
public javax.mail.internet.MimeMessage getReturnedMessage() throws javax.mail.MessagingException
javax.mail.MessagingException
public void setReturnedMessage(javax.mail.internet.MimeMessage msg) throws javax.mail.MessagingException
javax.mail.MessagingException
public void setSubType(java.lang.String subtype) throws javax.mail.MessagingException
setSubType
in class javax.mail.internet.MimeMultipart
subtype
- Subtype
javax.mail.MessagingException
- always; can't change subtypepublic boolean removeBodyPart(javax.mail.BodyPart part) throws javax.mail.MessagingException
removeBodyPart
in class javax.mail.internet.MimeMultipart
part
- The part to remove
javax.mail.MessagingException
- alwayspublic void removeBodyPart(int index) throws javax.mail.MessagingException
removeBodyPart
in class javax.mail.internet.MimeMultipart
index
- Index of the part to remove
javax.mail.MessagingException
- alwayspublic void addBodyPart(javax.mail.BodyPart part) throws javax.mail.MessagingException
addBodyPart
in class javax.mail.internet.MimeMultipart
part
- The Part to be appended
javax.mail.MessagingException
- alwayspublic void addBodyPart(javax.mail.BodyPart part, int index) throws javax.mail.MessagingException
index
.
Not allowed on a multipart/report object.
addBodyPart
in class javax.mail.internet.MimeMultipart
part
- The BodyPart to be insertedindex
- Location where to insert the part
javax.mail.MessagingException
- always
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |