Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Intelligence Publisher
11g Release 1 (11.1.1)

E17789-02


oracle.xdo.delivery.smtp
Class Attachment

java.lang.Object
  extended by javax.mail.Multipart
      extended by javax.mail.internet.MimeMultipart
          extended by oracle.xdo.delivery.smtp.Attachment

All Implemented Interfaces:
SMTPPropertyDefinitions

public class Attachment
extends javax.mail.internet.MimeMultipart
implements SMTPPropertyDefinitions

This is a utility class to allow users to create multiple attachments easily for the email.

It is like an array of attachments. It allows users to add multiple documents that users want to attach to the email, then users can attach this object to the email delivery request as a set of attachments.

See DeliveryManager javadoc for more detail.

See Also:
DeliveryManager

Field Summary

 

Fields inherited from interface oracle.xdo.delivery.smtp.SMTPPropertyDefinitions
SMTP_ATTACHMENT, SMTP_ATTACHMENT_FIRST, SMTP_BCC_RECIPIENTS, SMTP_CC_RECIPIENTS, SMTP_CHARACTER_ENCODING, SMTP_CHARSET, SMTP_CONTENT_DISPOSITION, SMTP_CONTENT_FILENAME, SMTP_CONTENT_TYPE, SMTP_CURRENT_DIRECTORY, SMTP_DIRECTORY_MAPPINGS, SMTP_ENCODING, SMTP_FROM, SMTP_HOST, SMTP_PASSWORD, SMTP_PORT, SMTP_REPLY_TO, SMTP_SECURE_CONNECTION, SMTP_SECURE_CONNECTION_NONE, SMTP_SECURE_CONNECTION_SSL, SMTP_SECURE_CONNECTION_TLS, SMTP_SECURE_CONNECTION_TLS_REQUIRED, SMTP_SUBJECT, SMTP_TO_RECIPIENTS, SMTP_USERNAME

 

Constructor Summary
Attachment()
          Constructor.
Attachment(javax.activation.DataSource pDataSource)
          Constructor with the data source.
Attachment(java.util.Hashtable pProps)
          Constructor with properties.

 

Method Summary
 java.io.OutputStream addAttachment(java.lang.String pFileName, java.lang.String pContentType)
          Deprecated. It returns null now. Use other addAttachment() methods with using InputStream or filename to specify the document to deliver.
 void addAttachment(java.lang.String pFileName, java.lang.String pContentType, java.io.InputStream pBody)
          Adds a file as an attachment.
 java.io.OutputStream addAttachment(java.lang.String pFileName, java.lang.String pContentType, javax.mail.internet.MimeBodyPart pMimeBody, int pIndex)
          Deprecated. It returns null now. Use other addAttachment() methods with using InputStream or filename to specify the document to deliver.
 void addAttachment(java.lang.String pSourceFileName, java.lang.String pFileName, java.lang.String pContentType)
          Adds a file as an attachment.
 void addHtmlAttachment(java.io.InputStream pHtmlDocument, java.lang.String pFileName, java.lang.String pCurrentDir, javax.mail.internet.MimeBodyPart pBodyPart, java.util.Hashtable pDirMappings)
          Adds a HTML file as an attachment.
 void addHtmlAttachment(java.io.InputStream pHtmlDocument, java.lang.String pFileName, java.lang.String pCurrentDir, javax.mail.internet.MimeBodyPart pBodyPart, java.util.Hashtable pDirMappings, int pIndex, java.lang.String pDisposition)
           
 void addHtmlAttachment(java.io.InputStream pHtmlDocument, java.lang.String pFileName, java.lang.String pContentType, java.lang.String pCurrentDir, javax.mail.internet.MimeBodyPart pBodyPart, java.util.Hashtable pDirMappings, int pIndex, java.lang.String pDisposition)
           
 void addHtmlAttachment(java.io.InputStream pHtmlDocument, java.lang.String pFileName, java.lang.String pContentType, java.lang.String pCurrentDir, javax.mail.internet.MimeBodyPart pBodyPart, java.util.Hashtable pDirMappings, int pIndex, java.lang.String pDisposition, boolean deleteImages)
           
 void addHtmlAttachment(java.lang.String pFileName)
          Adds a HTML file as an attachment.
 void addHtmlAttachment(java.lang.String pFileName, java.util.Hashtable pDirMappings)
          Adds a HTML file as an attachment.
 void addHtmlAttachment(java.lang.String pFileName, javax.mail.internet.MimeBodyPart pBodyPart, java.util.Hashtable pDirMappings)
          Adds a HTML file as an attachment.
 void addHtmlAttachment(java.lang.String pFileName, java.lang.String pURLPath, java.lang.String pPhysicalPath)
          Adds a HTML file as an attachment.
 void setProperties(java.util.Hashtable pProps)
          Sets the prooperies.

 

Methods inherited from class javax.mail.internet.MimeMultipart
addBodyPart, addBodyPart, getBodyPart, getBodyPart, getCount, getPreamble, isComplete, removeBodyPart, removeBodyPart, setPreamble, setSubType, writeTo

 

Methods inherited from class javax.mail.Multipart
getContentType, getParent, setParent

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

Attachment

public Attachment()
           throws javax.mail.MessagingException
Constructor.
Throws:
javax.mail.MessagingException

Attachment

public Attachment(javax.activation.DataSource pDataSource)
           throws javax.mail.MessagingException
Constructor with the data source.
Parameters:
pDataSource -
Throws:
javax.mail.MessagingException

Attachment

public Attachment(java.util.Hashtable pProps)
           throws javax.mail.MessagingException
Constructor with properties.
Parameters:
pProps -
Throws:
javax.mail.MessagingException

Method Detail

setProperties

public void setProperties(java.util.Hashtable pProps)
Sets the prooperies.
Parameters:
pProps - properties

addHtmlAttachment

public void addHtmlAttachment(java.lang.String pFileName)
                       throws DeliveryException
Adds a HTML file as an attachment.
Parameters:
pFileName - HTML file
Throws:
DeliveryException

addHtmlAttachment

public void addHtmlAttachment(java.lang.String pFileName,
                              java.lang.String pURLPath,
                              java.lang.String pPhysicalPath)
                       throws DeliveryException
Adds a HTML file as an attachment.
Parameters:
pFileName - HTML file
Throws:
DeliveryException

addHtmlAttachment

public void addHtmlAttachment(java.lang.String pFileName,
                              java.util.Hashtable pDirMappings)
                       throws DeliveryException
Adds a HTML file as an attachment.
Parameters:
pFileName - HTML file
Throws:
DeliveryException

addHtmlAttachment

public void addHtmlAttachment(java.lang.String pFileName,
                              javax.mail.internet.MimeBodyPart pBodyPart,
                              java.util.Hashtable pDirMappings)
                       throws DeliveryException
Adds a HTML file as an attachment.
Parameters:
pFileName - HTML file
pBodyPart - MimeBodyPart that you want to attach the HTML.
Throws:
DeliveryException

addHtmlAttachment

public void addHtmlAttachment(java.io.InputStream pHtmlDocument,
                              java.lang.String pFileName,
                              java.lang.String pCurrentDir,
                              javax.mail.internet.MimeBodyPart pBodyPart,
                              java.util.Hashtable pDirMappings)
                       throws DeliveryException
Adds a HTML file as an attachment.
Parameters:
pHtmlDocument - HTML document
pFileName - File name for this HTML that will appear in the email
pCurrentDir - Current directory name, needed for parsing images.
pBodyPart - MimeBodyPart that you want to attach this HTML.
Throws:
DeliveryException

addHtmlAttachment

public void addHtmlAttachment(java.io.InputStream pHtmlDocument,
                              java.lang.String pFileName,
                              java.lang.String pCurrentDir,
                              javax.mail.internet.MimeBodyPart pBodyPart,
                              java.util.Hashtable pDirMappings,
                              int pIndex,
                              java.lang.String pDisposition)
                       throws DeliveryException
Throws:
DeliveryException

addHtmlAttachment

public void addHtmlAttachment(java.io.InputStream pHtmlDocument,
                              java.lang.String pFileName,
                              java.lang.String pContentType,
                              java.lang.String pCurrentDir,
                              javax.mail.internet.MimeBodyPart pBodyPart,
                              java.util.Hashtable pDirMappings,
                              int pIndex,
                              java.lang.String pDisposition)
                       throws DeliveryException
Throws:
DeliveryException

addHtmlAttachment

public void addHtmlAttachment(java.io.InputStream pHtmlDocument,
                              java.lang.String pFileName,
                              java.lang.String pContentType,
                              java.lang.String pCurrentDir,
                              javax.mail.internet.MimeBodyPart pBodyPart,
                              java.util.Hashtable pDirMappings,
                              int pIndex,
                              java.lang.String pDisposition,
                              boolean deleteImages)
                       throws DeliveryException
Throws:
DeliveryException

addAttachment

public void addAttachment(java.lang.String pFileName,
                          java.lang.String pContentType,
                          java.io.InputStream pBody)
                   throws DeliveryException
Adds a file as an attachment.
Parameters:
pFileName - File name for this attachment that will appear in the email.
pContentType - content type of this attachment
pBody - content of this attachment
Throws:
DeliveryException

addAttachment

public void addAttachment(java.lang.String pSourceFileName,
                          java.lang.String pFileName,
                          java.lang.String pContentType)
                   throws DeliveryException
Adds a file as an attachment.
Parameters:
pSourceFileName - File name of the file to attach.
pFileName - File name for this attachment that will appear in the email.
pContentType - content type of the attachment
Throws:
DeliveryException

addAttachment

public java.io.OutputStream addAttachment(java.lang.String pFileName,
                                          java.lang.String pContentType)
                                   throws DeliveryException
Deprecated. It returns null now. Use other addAttachment() methods with using InputStream or filename to specify the document to deliver.
Adds a file as an attachment. It adds a new attachment and returns the output stream connected to the attachment. You can write to the contents of the attachment to the output stream. Please note that it is your responsibility to close the output stream to tell the end of the contents by calling flush() and close() method.
Parameters:
pFileName - File name for this attachment that will appear in the email.
pContentType - content type of the attachment
Returns:
OutputStream connected to the attachment
Throws:
DeliveryException

addAttachment

public java.io.OutputStream addAttachment(java.lang.String pFileName,
                                          java.lang.String pContentType,
                                          javax.mail.internet.MimeBodyPart pMimeBody,
                                          int pIndex)
                                   throws DeliveryException
Deprecated. It returns null now. Use other addAttachment() methods with using InputStream or filename to specify the document to deliver.
Adds a file as an attachment. It adds a new attachment and returns the output stream connected to the attachment. You can write to the contents of the attachment to the output stream. Please note that it is your responsibility to close the output stream to tell the end of the contents by calling flush() and close() method.
Parameters:
pFileName - File name for this attachment that will appear in the email.
pContentType - content type of the attachment
pMimeBody - MimeBodyPart that you want to attach this file.
Returns:
OutputStream connected to the attachment
Throws:
DeliveryException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Intelligence Publisher
11g Release 1 (11.1.1)

E17789-02


Copyright © 2010, 2011, Oracle. All rights reserved.