net.fortuna.mstor.connector.mbox
Class YamlMetaMessage

java.lang.Object
  extended by net.fortuna.mstor.connector.AbstractMessageDelegate
      extended by net.fortuna.mstor.connector.mbox.YamlMetaMessage
All Implemented Interfaces:
MessageDelegate

public class YamlMetaMessage
extends AbstractMessageDelegate

Author:
Ben
 $Id$

 Created on 03/05/2008
 

Constructor Summary
YamlMetaMessage(MessageExt messageExt, YamlMetaFolder folder)
           
 
Method Summary
 javax.mail.Flags getFlags()
          
 java.util.Date getForwarded()
          
 javax.mail.internet.InternetHeaders getHeaders()
          
 java.io.InputStream getInputStream()
          
 MessageDelegate getInReplyTo()
          
 int getMessageNumber()
          Returns the 1-based number of the message the delegate is associated with.
 java.util.Date getReceived()
          
 java.util.List<? extends MessageDelegate> getReferences()
          
 java.util.Date getReplied()
          
 long getUid()
          Returns the UID associated with the message.
 boolean isExpunged()
          
 void saveChanges()
          Persist unsaved changes.
 void setExpunged(boolean expunged)
          
 void setFlags(javax.mail.Flags flags)
          
 void setForwarded(java.util.Date forwarded)
          
 void setHeaders(java.util.Enumeration<javax.mail.Header> headers)
          
 void setReceived(java.util.Date received)
          
 void setReplied(java.util.Date replied)
          
 void setUid(long uid)
          Sets the UID associated with the message.
 
Methods inherited from class net.fortuna.mstor.connector.AbstractMessageDelegate
setHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YamlMetaMessage

public YamlMetaMessage(MessageExt messageExt,
                       YamlMetaFolder folder)
Parameters:
messageNumber -
folder -
Method Detail

getFlags

public javax.mail.Flags getFlags()

Returns:
Returns the flags.

getForwarded

public java.util.Date getForwarded()

Returns:
Returns the forwarded.

getHeaders

public javax.mail.internet.InternetHeaders getHeaders()

Returns:
headers saved in delegate

getMessageNumber

public int getMessageNumber()
Returns the 1-based number of the message the delegate is associated with. If a message number is not set it is assumed the message does not belong to a folder and thus has a message number of zero (0).

Returns:
the message number associated with this delegate, or zero if no message number is identified

getReceived

public java.util.Date getReceived()

Returns:
Returns the received.

getReplied

public java.util.Date getReplied()

Returns:
Returns the replied.

getUid

public long getUid()
Returns the UID associated with the message.

Returns:
a long representation of a UID, or -1 if no UID is assigned

isExpunged

public boolean isExpunged()

Returns:
Returns the expunged.

saveChanges

public void saveChanges()
                 throws DelegateException
Persist unsaved changes.

Throws:
DelegateException - where an error occurs saving changes in the message

setExpunged

public void setExpunged(boolean expunged)

Parameters:
expunged - The expunged to set.

setFlags

public void setFlags(javax.mail.Flags flags)

Parameters:
flags - The flags to set.

setForwarded

public void setForwarded(java.util.Date forwarded)

Parameters:
forwarded - The forwarded to set.

setHeaders

public void setHeaders(java.util.Enumeration<javax.mail.Header> headers)

Parameters:
headers - an enumeration of headers to attach to the message

setReceived

public void setReceived(java.util.Date received)

Parameters:
received - The received to set.

setReplied

public void setReplied(java.util.Date replied)

Parameters:
replied - The replied to set.

setUid

public void setUid(long uid)
Sets the UID associated with the message.

Parameters:
uid - a UID value to associate with the message

getInReplyTo

public MessageDelegate getInReplyTo()
                             throws java.lang.UnsupportedOperationException

Returns:
a message to which this is a reply to
Throws:
java.lang.UnsupportedOperationException - if this method is not supported by the message implementation

getReferences

public java.util.List<? extends MessageDelegate> getReferences()
                                                        throws java.lang.UnsupportedOperationException

Returns:
a list of messages related to this one
Throws:
java.lang.UnsupportedOperationException - if this method is not supported by the message implementation

getInputStream

public java.io.InputStream getInputStream()

Returns:
an input stream for message data


Copyright © 2004-2011 Micronode. All Rights Reserved.