|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openexchange.messaging.SimpleMessagingMessage
public class SimpleMessagingMessage
| Field Summary |
|---|
| Fields inherited from interface com.openexchange.messaging.MessagingMessage |
|---|
FLAG_ANSWERED, FLAG_DELETED, FLAG_DRAFT, FLAG_FLAGGED, FLAG_FORWARDED, FLAG_READ_ACK, FLAG_RECENT, FLAG_SEEN, FLAG_SPAM, FLAG_USER, USER_FORWARDED, USER_READ_ACK |
| Fields inherited from interface com.openexchange.messaging.MessagingPart |
|---|
ATTACHMENT, INLINE |
| Fields inherited from interface com.openexchange.messaging.MessagingPart |
|---|
ATTACHMENT, INLINE |
| Constructor Summary | |
|---|---|
SimpleMessagingMessage()
|
|
| Method Summary | |
|---|---|
int |
getColorLabel()
Gets the color label. |
MessagingContent |
getContent()
Gets the content. |
ContentType |
getContentType()
Gets the Content-Type header of this part's content. |
java.lang.String |
getDisposition()
Gets the disposition. |
java.lang.String |
getFileName()
Get the filename associated with this part, if possible. |
MessagingHeader |
getFirstHeader(java.lang.String name)
Gets the first header value associated with specified name or null if not present |
int |
getFlags()
Gets the flag bitmask. |
java.lang.String |
getFolder()
Gets the folder fullname. |
java.util.Collection<MessagingHeader> |
getHeader(java.lang.String name)
Gets the header associated with specified name or null if not present |
java.util.Map<java.lang.String,java.util.Collection<MessagingHeader>> |
getHeaders()
Gets the headers as an unmodifiable Map. |
java.lang.String |
getId()
Gets the identifier. |
MultipartContent |
getParent()
Gets the multipart parent. |
java.lang.String |
getPicture()
Gets the URL to use as a picture for this message. |
long |
getReceivedDate()
Gets the received date (storage's internal time stamp). |
java.lang.String |
getSectionId()
Gets the section identifier. |
long |
getSize()
Get the size of this part in bytes. |
int |
getThreadLevel()
Get the thread level of this message. |
java.lang.String |
getUrl()
Gets the URL associated with this message, if possible. |
java.util.Collection<java.lang.String> |
getUserFlags()
Gets the user flags. |
void |
putHeader(MessagingHeader header)
|
void |
setColorLabel(int colorLabel)
|
void |
setContent(byte[] bytes)
|
void |
setContent(MessagingBodyPart... parts)
|
void |
setContent(java.lang.String content)
|
void |
setContentReference(java.lang.String string)
|
void |
setContentType(ContentType contentType)
|
void |
setDisposition(java.lang.String disposition)
|
void |
setFileName(java.lang.String fileName)
|
void |
setFlags(int flags)
|
void |
setFolder(java.lang.String folder)
|
void |
setHeaders(java.util.Map<java.lang.String,java.util.Collection<MessagingHeader>> headers)
|
void |
setId(java.lang.String id)
|
void |
setParent(MultipartContent parent)
|
void |
setPicture(java.lang.String picture)
|
void |
setReceivedDate(long receivedDate)
|
void |
setSectionId(java.lang.String sectionId)
|
void |
setSize(long size)
|
void |
setThreadLevel(int threadLevel)
|
void |
setUrl(java.lang.String url)
|
void |
setUserFlags(java.util.Collection<java.lang.String> userFlags)
|
void |
writeTo(java.io.OutputStream os)
Writes this part's bytes to given output stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleMessagingMessage()
| Method Detail |
|---|
public int getColorLabel()
MessagingMessage
getColorLabel in interface MessagingMessagepublic int getFlags()
MessagingMessage
getFlags in interface MessagingMessagepublic java.lang.String getFolder()
MessagingMessage
getFolder in interface MessagingMessagenull if not availablepublic long getReceivedDate()
MessagingMessage
getReceivedDate in interface MessagingMessage-1 if not availablepublic java.util.Collection<java.lang.String> getUserFlags()
MessagingMessage
getUserFlags in interface MessagingMessagenull if none available
public MessagingContent getContent()
throws MessagingException
MessagingPart
getContent in interface MessagingPartMessagingException - If content cannot be returned
public java.lang.String getDisposition()
throws MessagingException
MessagingPartThe disposition describes how the part should be presented (see RFC 2183). The return value should be compared case-insensitive. For example:
String disposition = part.getDisposition(); if (disposition == null || MessagingPart.ATTACHMENT.equalsIgnoreCase(disposition)) // treat as attachment if not first part
getDisposition in interface MessagingPartMessagingException - If disposition cannot be returnedMessagingPart.ATTACHMENT,
MessagingPart.INLINE
public java.lang.String getFileName()
throws MessagingException
MessagingPartUseful if this part represents an "attachment" that was loaded from a file. The filename will usually be a simple name, not including directory components.
getFileName in interface MessagingPartMessagingException - If filename cannot be returned
public MessagingHeader getFirstHeader(java.lang.String name)
throws MessagingException
MessagingPartnull if not present
getFirstHeader in interface MessagingPartname - The header name
null if not present
MessagingException - If header cannot be returnedpublic java.util.Collection<MessagingHeader> getHeader(java.lang.String name)
MessagingPartnull if not present
getHeader in interface MessagingPartname - The header name
null if not presentpublic java.util.Map<java.lang.String,java.util.Collection<MessagingHeader>> getHeaders()
MessagingPartMap.
getHeaders in interface MessagingPartMap.public java.lang.String getSectionId()
MessagingPart
getSectionId in interface MessagingPartnull if top levelpublic long getSize()
MessagingPart-1 if the size cannot be determined.
getSize in interface MessagingPart-1public int getThreadLevel()
MessagingMessage
getThreadLevel in interface MessagingMessage
public void writeTo(java.io.OutputStream os)
throws java.io.IOException,
MessagingException
MessagingPartThe bytes are typically used for transport.
writeTo in interface MessagingPartjava.io.IOException - If an I/O error occurs
MessagingException - If an error occurs fetching the data to be writtenpublic void setColorLabel(int colorLabel)
public void setFlags(int flags)
public void setFolder(java.lang.String folder)
public void setReceivedDate(long receivedDate)
public void setUserFlags(java.util.Collection<java.lang.String> userFlags)
public void setDisposition(java.lang.String disposition)
public void setFileName(java.lang.String fileName)
public void setHeaders(java.util.Map<java.lang.String,java.util.Collection<MessagingHeader>> headers)
public void putHeader(MessagingHeader header)
public void setSectionId(java.lang.String sectionId)
public void setContent(java.lang.String content)
public void setSize(long size)
public void setThreadLevel(int threadLevel)
public void setContent(byte[] bytes)
public void setContent(MessagingBodyPart... parts)
public MultipartContent getParent()
throws MessagingException
MessagingBodyPart
getParent in interface MessagingBodyPartMessagingException - If multipart parent cannot be returnedpublic void setParent(MultipartContent parent)
public ContentType getContentType()
throws MessagingException
MessagingPartContent-Type header of this part's content. null is returned if the Content-Type
header could not be determined.
getContentType in interface MessagingPartContent-Type header of this part
MessagingException - If content type cannot be returnedpublic void setContentType(ContentType contentType)
public java.lang.String getId()
MessagingMessage
getId in interface MessagingMessagenull if not availablepublic void setId(java.lang.String id)
public java.lang.String getPicture()
MessagingMessage
getPicture in interface MessagingMessagepublic void setPicture(java.lang.String picture)
public void setUrl(java.lang.String url)
public java.lang.String getUrl()
throws MessagingException
MessagingMessageThis is useful for RSS messages as they contain links to their origin messages or feeds.
getUrl in interface MessagingMessageMessagingException - If no URL can be returned.public void setContentReference(java.lang.String string)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||