public final class IDMailMessage extends MailMessage
COLOR_LABEL_NONE, COLOR_LABEL_PREFIX, COLOR_LABEL_PREFIX_OLD, FLAG_ANSWERED, FLAG_DELETED, FLAG_DRAFT, FLAG_FLAGGED, FLAG_FORWARDED, FLAG_READ_ACK, FLAG_RECENT, FLAG_SEEN, FLAG_SPAM, FLAG_USER, PRIORITY_HIGH, PRIORITY_HIGHEST, PRIORITY_LOW, PRIORITY_LOWEST, PRIORITY_NORMAL, USER_FORWARDED, USER_READ_ACKNO_ENCLOSED_PARTS| Constructor and Description |
|---|
IDMailMessage()
Initializes a new
IDMailMessage |
IDMailMessage(java.lang.String mailId,
java.lang.String folder)
Initializes a new
IDMailMessage |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getContent()
Returns the part's content as a Java object dependent on underlying implementation.
|
javax.activation.DataHandler |
getDataHandler()
Returns an appropriate
DataHandler for this mail part. |
int |
getEnclosedCount()
Gets the number of enclosed mail parts.
|
MailPart |
getEnclosedMailPart(int index)
Gets the mail part located at given index.
|
java.io.InputStream |
getInputStream()
Returns an input stream for this part.
|
java.lang.String |
getMailId()
Gets the implementation-specific unique ID of this mail in its mail folder.
|
char |
getSeparator()
Gets the separator.
|
int |
getSeqnum()
Gets the sequence number.
|
long |
getUid()
Gets the UID
|
int |
getUnreadMessages()
Gets the number of unread messages
|
void |
loadContent()
Ensures that the part's content is loaded, thus this part is independent of the original.
|
void |
prepareForCaching()
Prepares this mail part to be put into cache; meaning to release all kept resources
|
void |
setMailId(java.lang.String id)
Sets the implementation-specific unique mail ID of this mail in its mail folder.
|
void |
setSeparator(char separator)
Sets the separator.
|
void |
setSeqnum(int seqnum)
Sets the sequence number.
|
void |
setUid(long uid)
Sets the UID
|
void |
setUnreadMessages(int unreadMessages)
Sets the number of unread messages
|
java.lang.String |
toString() |
addBcc, addBcc, addCc, addCc, addFrom, addFrom, addTo, addTo, addUserFlag, addUserFlags, clone, containsAccountId, containsAccountName, containsAppendVCard, containsBcc, containsCc, containsColorLabel, containsDispositionNotification, containsFlags, containsFolder, containsFrom, containsHasAttachment, containsMessageId, containsPrevSeen, containsPriority, containsReceivedDate, containsRecentCount, containsReferences, containsSentDate, containsSubject, containsThreadLevel, containsTo, containsUserFlags, getAccountId, getAccountName, getBcc, getCc, getColorLabel, getColorLabelIntValue, getColorLabelStringValue, getDispositionNotification, getFlags, getFolder, getFrom, getInReplyTo, getMailPath, getMessageId, getPriority, getReceivedDate, getReceivedDateDirect, getRecentCount, getReferences, getSentDate, getSubject, getThreadLevel, getTo, getUserFlags, hasAttachment, isAnswered, isAppendVCard, isColorLabel, isDeleted, isDraft, isFlagged, isForwarded, isPrevSeen, isReadAcknowledgment, isRecent, isSeen, isSpam, isUser, parseColorLabel, removeAccountId, removeAccountName, removeAppendVCard, removeBcc, removeCc, removeColorLabel, removeDispositionNotification, removeFlags, removeFolder, removeFrom, removeHasAttachment, removeMessageId, removePrevSeen, removePriority, removeReceivedDate, removeRecentCount, removeReferences, removeSentDate, removeSubject, removeThreadLevel, removeTo, removeUserFlags, setAccountId, setAccountName, setAppendVCard, setColorLabel, setDispositionNotification, setFlag, setFlags, setFolder, setHasAttachment, setMessageId, setPrevSeen, setPriority, setReceivedDate, setRecentCount, setReferences, setReferences, setSentDate, setSubject, setThreadLeveladdHeader, addHeaders, containsContentDisposition, containsContentId, containsContentType, containsFileName, containsHeader, containsHeaders, containsMsgref, containsSequenceId, containsSize, getContentDisposition, getContentId, getContentType, getFileName, getFirstHeader, getHeader, getHeader, getHeader, getHeaders, getHeadersIterator, getHeadersSize, getMatchingHeaders, getMsgref, getNonMatchingHeaders, getSequenceId, getSize, getSource, getSourceBytes, hasEnclosedParts, hasHeaders, removeContentDisposition, removeContentId, removeContentType, removeFileName, removeHeader, removeHeaders, removeMsgref, removeSequenceId, removeSize, setContentDisposition, setContentDisposition, setContentId, setContentType, setContentType, setFileName, setHeader, setMsgref, setSequenceId, setSize, writeTopublic IDMailMessage()
IDMailMessagepublic IDMailMessage(java.lang.String mailId,
java.lang.String folder)
IDMailMessagepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getMailId()
MailMessagegetMailId in class MailMessagenull if not available.public int getUnreadMessages()
MailMessagegetUnreadMessages in class MailMessagepublic void setMailId(java.lang.String id)
MailMessagesetMailId in class MailMessageid - The mail ID or null to indicate its absencepublic long getUid()
-1 if absentpublic void setUid(long uid)
uid - The UID to set or -1 to indicate absencepublic char getSeparator()
public void setSeparator(char separator)
separator - The separator to setpublic int getSeqnum()
public void setSeqnum(int seqnum)
seqnum - The sequence number to setpublic void setUnreadMessages(int unreadMessages)
MailMessagesetUnreadMessages in class MailMessageunreadMessages - The number of unread messagespublic java.lang.Object getContent()
throws com.openexchange.exception.OXException
MailPartmultipart/*getContent in class MailPartnull if not applicablecom.openexchange.exception.OXException - If content cannot be returned as a Java objectpublic javax.activation.DataHandler getDataHandler()
throws com.openexchange.exception.OXException
MailPartDataHandler for this mail part. multipart/*getDataHandler in class MailPartDataHandler or null if not applicablecom.openexchange.exception.OXException - If an appropriate DataHandler cannot be returnedpublic int getEnclosedCount()
throws com.openexchange.exception.OXException
MailPartmultipart/*getEnclosedCount in class MailPartMailPart.NO_ENCLOSED_PARTS if not applicablecom.openexchange.exception.OXExceptionMailPart.NO_ENCLOSED_PARTSpublic MailPart getEnclosedMailPart(int index) throws com.openexchange.exception.OXException
MailPartmultipart/*getEnclosedMailPart in class MailPartindex - The index of desired mail part or null if not applicablecom.openexchange.exception.OXExceptionpublic java.io.InputStream getInputStream()
throws com.openexchange.exception.OXException
MailPartmultipart/*getInputStream in class MailPartnull if not applicablecom.openexchange.exception.OXException - If no input stream could be returnedpublic void loadContent()
throws com.openexchange.exception.OXException
MailPartThis method is intended for mailing systems that read the contents stepwise on demand. If dealing with such a mail part with its underlying connection closed, the part's content is no more accessible. Otherwise this method may be implemented with an empty body.
Moreover the loaded content is no more discarded when MailPart.prepareForCaching() is invoked.
loadContent in class MailPartcom.openexchange.exception.OXException - If loading part's content failspublic void prepareForCaching()
MailPartprepareForCaching in class MailPart