com.openexchange.messaging
Interface MessagingMessage

All Superinterfaces:
MessagingContent, MessagingPart, java.io.Serializable
All Known Subinterfaces:
ParameterizedMessagingMessage
All Known Implementing Classes:
SimpleMessagingMessage, SMSMessagingMessage

public interface MessagingMessage
extends MessagingPart, MessagingContent, java.io.Serializable

MessagingMessage - A message.

Since:
Open-Xchange v6.16
Author:
Francisco Laguna, Thorben Betten

Field Summary
static int FLAG_ANSWERED
          This message has been answered.
static int FLAG_DELETED
          This message is marked deleted.
static int FLAG_DRAFT
          This message is a draft.
static int FLAG_FLAGGED
          This message is flagged.
static int FLAG_FORWARDED
          Virtual forwarded flag that marks this message as being forwarded.
static int FLAG_READ_ACK
          Virtual read acknowledgment flag that marks this message as being notified for delivery.
static int FLAG_RECENT
          This message is recent.
static int FLAG_SEEN
          This message is seen.
static int FLAG_SPAM
          Virtual Spam flag
static int FLAG_USER
          A special flag that indicates that this folder supports user defined flags.
static java.lang.String USER_FORWARDED
          The value of virtual forwarded flag.
static java.lang.String USER_READ_ACK
          The value of virtual read acknowledgment flag.
 
Fields inherited from interface com.openexchange.messaging.MessagingPart
ATTACHMENT, INLINE
 
Method Summary
 int getColorLabel()
          Gets the color label.
 int getFlags()
          Gets the flag bitmask.
 java.lang.String getFolder()
          Gets the folder fullname.
 java.lang.String getId()
          Gets the identifier.
 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).
 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.
 
Methods inherited from interface com.openexchange.messaging.MessagingPart
getContent, getContentType, getDisposition, getFileName, getFirstHeader, getHeader, getHeaders, getSectionId, getSize, writeTo
 

Field Detail

FLAG_ANSWERED

static final int FLAG_ANSWERED
This message has been answered. This flag is set by clients to indicate that this message has been answered to.

See Also:
Constant Field Values

FLAG_DELETED

static final int FLAG_DELETED
This message is marked deleted. Clients set this flag to mark a message as deleted. The expunge operation on a folder removes all messages in that folder that are marked for deletion.

See Also:
Constant Field Values

FLAG_DRAFT

static final int FLAG_DRAFT
This message is a draft. This flag is set by clients to indicate that the message is a draft message.

See Also:
Constant Field Values

FLAG_FLAGGED

static final int FLAG_FLAGGED
This message is flagged. No semantic is defined for this flag. Clients alter this flag.

See Also:
Constant Field Values

FLAG_RECENT

static final int FLAG_RECENT
This message is recent. Folder implementations set this flag to indicate that this message is new to this folder, that is, it has arrived since the last time this folder was opened.

Clients cannot alter this flag.

See Also:
Constant Field Values

FLAG_SEEN

static final int FLAG_SEEN
This message is seen. This flag is implicitly set by the implementation when the this Message's content is returned to the client in some form.

See Also:
Constant Field Values

FLAG_USER

static final int FLAG_USER
A special flag that indicates that this folder supports user defined flags.

Clients cannot alter this flag.

See Also:
Constant Field Values

FLAG_SPAM

static final int FLAG_SPAM
Virtual Spam flag

See Also:
Constant Field Values

FLAG_FORWARDED

static final int FLAG_FORWARDED
Virtual forwarded flag that marks this message as being forwarded.

See Also:
Constant Field Values

FLAG_READ_ACK

static final int FLAG_READ_ACK
Virtual read acknowledgment flag that marks this message as being notified for delivery.

See Also:
Constant Field Values

USER_FORWARDED

static final java.lang.String USER_FORWARDED
The value of virtual forwarded flag.

See Also:
Constant Field Values

USER_READ_ACK

static final java.lang.String USER_READ_ACK
The value of virtual read acknowledgment flag.

See Also:
Constant Field Values
Method Detail

getFolder

java.lang.String getFolder()
Gets the folder fullname.

Returns:
The folder fullname or null if not available

getColorLabel

int getColorLabel()
                  throws MessagingException
Gets the color label.

Returns:
The color label
Throws:
MessagingException - If color label cannot be returned

getFlags

int getFlags()
             throws MessagingException
Gets the flag bitmask.

Returns:
The flag bitmask
Throws:
MessagingException - If flag bitmask cannot be returned

getReceivedDate

long getReceivedDate()
Gets the received date (storage's internal time stamp).

Returns:
The received date or -1 if not available

getUserFlags

java.util.Collection<java.lang.String> getUserFlags()
                                                    throws MessagingException
Gets the user flags.

Returns:
The user flags or null if none available
Throws:
MessagingException - If user flags cannot be returned

getThreadLevel

int getThreadLevel()
Get the thread level of this message.

Returns:
The thread level of this message

getId

java.lang.String getId()
Gets the identifier.

Returns:
The identifier or null if not available

getPicture

java.lang.String getPicture()
Gets the URL to use as a picture for this message. Typically represents the source or author.


getUrl

java.lang.String getUrl()
                        throws MessagingException
Gets the URL associated with this message, if possible.

This is useful for RSS messages as they contain links to their origin messages or feeds.

Returns:
Gets the URL associated with this message.
Throws:
MessagingException - If no URL can be returned.