|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.publish.MailAttachment
public class MailAttachment
Container class for maintaining email attachment information.
This class is a utility class for mail transports and is not intended to be invoked directly by the calling application.
Field Summary | |
---|---|
static int |
ATTACHMENT_PATH_TYPE_DAV
Attachment specified as a WebDAV URL location |
static int |
ATTACHMENT_PATH_TYPE_FILE
Attachment specified as a physical filesystem path. |
static int |
ATTACHMENT_PATH_TYPE_NONE
No path information specified. |
static int |
ATTACHMENT_PATH_TYPE_URL
Attachment specified as a URL. |
Constructor Summary | |
---|---|
MailAttachment(java.io.InputStream inputStream,
java.lang.String contentId,
java.lang.String name,
java.lang.String contentType)
Create an input stream attachment object. |
|
MailAttachment(java.lang.String path,
java.lang.String contentId,
java.lang.String name,
java.lang.String contentType)
Create an file-system attachment object. |
|
MailAttachment(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.String contentId,
java.lang.String name,
java.lang.String contentType)
Create a WebDAV attachment object. |
|
MailAttachment(java.net.URL url,
java.lang.String contentId,
java.lang.String name,
java.lang.String contentType)
Create a URL attachment object. |
Method Summary | |
---|---|
java.lang.String |
getContentId()
The Content-Id to use when defining this mail attachment. |
java.lang.String |
getContentType()
Return the MIME type of the attachment. |
java.io.InputStream |
getInputStream()
Return the input stream that identifies the attachment. |
java.lang.String |
getName()
Return the name of the attachment file as it will appear in the mail message. |
java.lang.String |
getPassword()
|
java.lang.String |
getPath()
Return the name of the attachment file. |
int |
getType()
Return the type of path specification. |
java.net.URL |
getURL()
Return the name of the attachment file. |
java.lang.String |
getUser()
|
Field Detail |
---|
public static final int ATTACHMENT_PATH_TYPE_NONE
public static final int ATTACHMENT_PATH_TYPE_FILE
public static final int ATTACHMENT_PATH_TYPE_URL
public static final int ATTACHMENT_PATH_TYPE_DAV
Constructor Detail |
---|
public MailAttachment(java.lang.String path, java.lang.String contentId, java.lang.String name, java.lang.String contentType)
path
- Complete path, including the filename, of the file to include
as an attachment.contentId
- The Content-Id to use when defining this mail attachment.
If non-null, then the attachment will be embedded in the mail
message. If null
, the file will not be embedded
but will be included as an attachment.name
- The name of the attachment file as it will appear in the mail
message. If null
is specified, the file name will
be used.contentType
- The MIME type of the attachment. If null
is specified, the MIME type will be determined by the file
extension or content.public MailAttachment(java.lang.String url, java.lang.String user, java.lang.String password, java.lang.String contentId, java.lang.String name, java.lang.String contentType)
url
- the URL path as a string that identifies the attachment file on
a WebDAV server.contentId
- The Content-Id to use when defining this mail attachment.
If non-null, then the attachment will be embedded in the mail
message. If null
, the file will not be embedded
but will be included as an attachment.name
- The name of the attachment file as it will appear in the mail
message. If null
is specified, the file name will
be used.contentType
- The MIME type of the attachment. If null
is specified, the MIME type will be determined by the file
extension or content.public MailAttachment(java.net.URL url, java.lang.String contentId, java.lang.String name, java.lang.String contentType)
url
- the URL that identifies the attachment file.contentId
- The Content-Id to use when defining this mail attachment.
If non-null, then the attachment will be embedded in the mail
message. If null
, the file will not be embedded
but will be included as an attachment.name
- The name of the attachment file as it will appear in the mail
message. If null
is specified, the file name will
be used.contentType
- The MIME type of the attachment. If null
is specified, the MIME type will be determined by the file
extension or content.public MailAttachment(java.io.InputStream inputStream, java.lang.String contentId, java.lang.String name, java.lang.String contentType)
inputStream
- The input stream for the attachment.contentId
- The Content-Id to use when defining this mail attachment.
If non-null, then the attachment will be embedded in the mail
message. If null
, the file will not be embedded
but will be included as an attachment.name
- The name of the attachment file as it will appear in the mail
message.contentType
- The MIME type of the attachment.Method Detail |
---|
public int getType()
ATTACHMENT_PATH_TYPE_FILE
,ATTACHMENT_PATH_TYPE_URL
or
ATTACHMENT_PATH_TYPE_NONE
.
ATTACHMENT_PATH_TYPE_NONE
will be returned.public java.lang.String getContentType()
null
in which
case the MIME type will be determined by the underlying mail
implementation based on the file extension or file content.public java.lang.String getName()
public java.lang.String getPath()
public java.net.URL getURL()
null
if the attachment was specified as a file system path or an input
stream.public java.lang.String getContentId()
public java.io.InputStream getInputStream()
public java.lang.String getUser()
public java.lang.String getPassword()
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |