public final class MailEvent extends com.streamscape.sdo.event.AbstractMutableEvent implements EventDatagram
Title: Structured Data Objects: Mail Event
Description: An object that represents a Mail Event.
DataEvent
which presents a mail envelope as it's payload.
Copyright: Copyright (c) 2012
Company: StreamScape Technologies
Modifier and Type | Class and Description |
---|---|
static class |
MailEvent.MailAttachment |
SEMANTIC_TYPE_NAME
DEFAULT_SERIAL_VERSION_ID
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(MailEvent.MailAttachment attachment)
Adds provided attachment to attachment list.
|
void |
addAttachment(java.lang.String name,
byte[] data)
Adds attachment with provided name
name and data data . |
void |
addAttachment(java.lang.String name,
byte[] data,
java.lang.String mimeType)
Adds attachment with provided name
name , mime type mimeType and data |
void |
addAttachment(java.lang.String name,
byte[] data,
java.lang.String mimeType,
java.lang.String contentId)
Adds attachment with provided name
name , data data ,
mime type mimeType and Content-ID |
void |
attachFile(java.lang.String filePath,
java.lang.String mimeType,
java.lang.String contentId)
Adds the specified file as attachment.
|
boolean |
equals(java.lang.Object other) |
MailEvent.MailAttachment |
getAttachment(int index)
Returns attachment by index.
|
java.lang.String |
getAttachmentContentId(int index)
Returns attachment Content-ID by index.
|
byte[] |
getAttachmentData(int index)
Returns attachment data name by index.
|
java.lang.String |
getAttachmentMimeType(int index)
Returns attachment mime type by index.
|
java.lang.String |
getAttachmentName(int index)
Returns attachment name by index.
|
int |
getAttachmentsCount()
Returns the count of attachments.
|
java.util.List |
getBcc()
Returns the list of blind carbon copy recipients for this mail.
|
java.lang.String |
getBody()
Returns the body stored in this event.
|
java.util.List |
getCc()
Returns the list of additional recipients for this mail.
|
java.lang.String |
getContentType()
Returns the body content type.
|
java.util.List |
getFrom()
Returns the sender for this mail.
|
java.lang.String |
getFromAddress()
Returns the from address for this mail.
|
java.lang.String |
getFromName()
Returns Sender name.
|
java.lang.String |
getLastMessage() |
java.util.Date |
getReceivedDate()
Returns the mail Received Date.
|
java.util.Date |
getSentDate()
Returns the mail Sent Date.
|
java.lang.String |
getSignature() |
java.lang.String |
getSubject()
Returns the subject stored in this event.
|
java.util.List |
getTo()
Returns the list of recipients for this mail.
|
java.util.List |
getToAddresses()
Returns the to address for this mail.
|
void |
setBcc(java.util.List bccArg)
Sets the mail 'BCC' field.
|
void |
setBody(java.lang.String body)
Sets the mail body stored in this event.
|
void |
setCc(java.util.List ccArg)
Sets the mail 'CC' field.
|
void |
setContentType(java.lang.String contentType)
Sets the content type of a body.
|
void |
setFrom(java.util.List from)
Sets the mail 'FROM' field.
|
void |
setFromAddress(java.lang.String fromAddress)
Sets the mail from field.
|
void |
setFromName(java.lang.String fromName)
Sets the 'from' name field.
|
void |
setLastMessage(java.lang.String lastMessage) |
void |
setReceivedDate(java.util.Date receivedDate)
Sets the mail Received Date.
|
void |
setSentDate(java.util.Date sentDate)
Sets the mail Sent Date.
|
void |
setSignature(java.lang.String signature)
Sets mail signature field.
|
void |
setSubject(java.lang.String subject)
Sets the mail subject stored in this event.
|
void |
setTo(java.util.List to)
Sets the mail 'TO' field.
|
void |
setToAddresses(java.util.List toAddresses)
Sets the mail to field.
|
addAnnotation, clearEventProperties, protect, removeAnnotation, removeEventProperty, resetReplyTo, setCorrelationId, setCorrelationIdAsBytes, setDurable, setEventBigDecimalProperty, setEventBigDecimalProperty, setEventBooleanProperty, setEventByteProperty, setEventDoubleProperty, setEventExpiration, setEventFloatProperty, setEventGroupId, setEventIntProperty, setEventKey, setEventLongProperty, setEventObjectProperty, setEventShortProperty, setEventStringProperty, setFinal, setForwardTo, setReplyTo, setSecurityAssertionToken, setSecurityAssertionTokenAsBytes, unprotect
canConvertEventProperty, clone, existsEventProperty, getAnnotatedProperties, getAnnotation, getCorrelationId, getCorrelationIdAsBytes, getDurable, getEventBigDecimalProperty, getEventBooleanProperty, getEventByteProperty, getEventDoubleProperty, getEventExpiration, getEventFloatProperty, getEventGroupId, getEventId, getEventIntProperty, getEventKey, getEventLongProperty, getEventObjectProperty, getEventPropertyNames, getEventPropertyType, getEventShortProperty, getEventSource, getEventStringProperty, getForwardTo, getPermissions, getReadAccess, getReplyTo, getSecurityAssertionToken, getSecurityAssertionTokenAsBytes, getTimestamp, getTransmitAccess, getWriteAccess, hasAnnotatedProperties, hasSuitableAnnotationType, isProtected
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAnnotation, canConvertEventProperty, clearEventProperties, existsEventProperty, getAnnotatedProperties, getAnnotation, getCorrelationId, getCorrelationIdAsBytes, getEventBigDecimalProperty, getEventBooleanProperty, getEventByteProperty, getEventDoubleProperty, getEventExpiration, getEventFloatProperty, getEventIntProperty, getEventLongProperty, getEventObjectProperty, getEventPropertyNames, getEventPropertyType, getEventShortProperty, getEventStringProperty, getForwardTo, getPermissions, getReadAccess, getReplyTo, getSecurityAssertionToken, getSecurityAssertionTokenAsBytes, getTransmitAccess, getWriteAccess, hasAnnotatedProperties, isProtected, protect, removeAnnotation, removeEventProperty, resetReplyTo, setCorrelationId, setCorrelationIdAsBytes, setDurable, setEventBigDecimalProperty, setEventBigDecimalProperty, setEventBooleanProperty, setEventByteProperty, setEventDoubleProperty, setEventExpiration, setEventFloatProperty, setEventGroupId, setEventIntProperty, setEventKey, setEventLongProperty, setEventObjectProperty, setEventShortProperty, setEventStringProperty, setFinal, setForwardTo, setReplyTo, setSecurityAssertionToken, setSecurityAssertionTokenAsBytes, unprotect
clone, getDurable, getEventGroupId, getEventId, getEventKey, getEventSource, getTimestamp
getSerialVersionUID
public void setBody(java.lang.String body) throws SecurityViolationException
body
- the body to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.lang.String getBody() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setContentType(java.lang.String contentType) throws SecurityViolationException
contentType
- the body content type to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.lang.String getContentType() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setSubject(java.lang.String subject) throws SecurityViolationException
subject
- the subject to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.lang.String getSubject() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setFrom(java.util.List from) throws SecurityViolationException
from
- the list of recipients to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.util.List getFrom() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setFromAddress(java.lang.String fromAddress) throws SecurityViolationException
fromAddress
- the from mail address to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public void setFromName(java.lang.String fromName) throws SecurityViolationException
fromName
- the from mail address to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.lang.String getFromName() throws SecurityViolationException
SecurityViolationException
- if the event is protected from write access.public void setSignature(java.lang.String signature) throws SecurityViolationException
signature
- the from mail address to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.lang.String getSignature() throws SecurityViolationException
SecurityViolationException
- if the event is protected from write access.public java.lang.String getFromAddress() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setTo(java.util.List to) throws SecurityViolationException
to
- the list of recipients to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.util.List getTo() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setToAddresses(java.util.List toAddresses) throws SecurityViolationException
toAddress
- the from mail address to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.util.List getToAddresses() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setCc(java.util.List ccArg) throws SecurityViolationException
ccArg
- the list of additional recipients to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.util.List getCc() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setBcc(java.util.List bccArg) throws SecurityViolationException
bccArg
- the list of blind carbon copy recipients to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.util.List getBcc() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setSentDate(java.util.Date sentDate) throws SecurityViolationException
the
- Mail Send DateSDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.util.Date getSentDate() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setReceivedDate(java.util.Date receivedDate) throws SecurityViolationException
the
- Mail Received DateSDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.util.Date getReceivedDate() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public java.lang.String getLastMessage()
public void setLastMessage(java.lang.String lastMessage)
public void addAttachment(java.lang.String name, byte[] data) throws SecurityViolationException
name
and data data
.name
- the attachment name.data
- the attachment data.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public void addAttachment(java.lang.String name, byte[] data, java.lang.String mimeType) throws SecurityViolationException
name
, mime type mimeType and data data
.
name
- the attachment name.data
- the attachment data.mimeType
- the mime type, if null mime type defined from name extension.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public void addAttachment(java.lang.String name, byte[] data, java.lang.String mimeType, java.lang.String contentId) throws SecurityViolationException
name
, data data
,
mime type mimeType and Content-ID contentId.
name
- the attachment name.data
- the attachment data.mimeType
- the mime type, if null then mime type defined from name extension.contentId
- the Content-ID of attachment, if null then Content-ID not set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public void addAttachment(MailEvent.MailAttachment attachment) throws SecurityViolationException
attachment
- the attachment to be added.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public void attachFile(java.lang.String filePath, java.lang.String mimeType, java.lang.String contentId) throws SecurityViolationException, java.io.IOException
filePath
- the path to the specified file.mimeType
- the mime type, if null then mime type defined from name extension.contentId
- the Content-ID of attachment, if null then Content-ID not set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.java.io.IOException
- if the file does not exist or
if some error occurred during reading the file.public int getAttachmentsCount() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public MailEvent.MailAttachment getAttachment(int index) throws SecurityViolationException
index
- of attachment, 0 - first, 1 - second,...SecurityViolationException
- if the event is protected from read access.public java.lang.String getAttachmentName(int index) throws SecurityViolationException
index
- of attachment, 0 - first, 1 - second,...SecurityViolationException
- if the event is protected from read access.public byte[] getAttachmentData(int index) throws SecurityViolationException
index
- of attachment, 0 - first, 1 - second,...SecurityViolationException
- if the event is protected from read access.public java.lang.String getAttachmentMimeType(int index) throws SecurityViolationException
index
- of attachment, 0 - first, 1 - second, ...SecurityViolationException
- if the event is protected from read access.public java.lang.String getAttachmentContentId(int index) throws SecurityViolationException
index
- of attachment, 0 - first, 1 - second, ...SecurityViolationException
- if the event is protected from read access.public boolean equals(java.lang.Object other)
equals
in class com.streamscape.sdo.IAbstractDataEvent
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.