Package net.fortuna.mstor.connector.mbox
Class YamlMetaMessage
- java.lang.Object
-
- net.fortuna.mstor.connector.AbstractMessageDelegate
-
- net.fortuna.mstor.connector.mbox.YamlMetaMessage
-
- All Implemented Interfaces:
MessageDelegate
public class YamlMetaMessage extends AbstractMessageDelegate
-
-
Constructor Summary
Constructors Constructor Description YamlMetaMessage(MessageExt messageExt, YamlMetaFolder folder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.mail.FlagsgetFlags()DategetForwarded()javax.mail.internet.InternetHeadersgetHeaders()InputStreamgetInputStream()MessageDelegategetInReplyTo()intgetMessageNumber()Returns the 1-based number of the message the delegate is associated with.DategetReceived()List<? extends MessageDelegate>getReferences()DategetReplied()longgetUid()Returns the UID associated with the message.booleanisExpunged()voidsaveChanges()Persist unsaved changes.voidsetExpunged(boolean expunged)voidsetFlags(javax.mail.Flags flags)voidsetForwarded(Date forwarded)voidsetHeaders(Enumeration<javax.mail.Header> headers)voidsetReceived(Date received)voidsetReplied(Date replied)voidsetUid(long uid)Sets the UID associated with the message.-
Methods inherited from class net.fortuna.mstor.connector.AbstractMessageDelegate
setHeaders
-
-
-
-
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 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 Date getReceived()
- Returns:
- Returns the received.
-
getReplied
public 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 DelegateExceptionPersist 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(Date forwarded)
- Parameters:
forwarded- The forwarded to set.
-
setHeaders
public void setHeaders(Enumeration<javax.mail.Header> headers)
- Parameters:
headers- an enumeration of headers to attach to the message
-
setReceived
public void setReceived(Date received)
- Parameters:
received- The received to set.
-
setReplied
public void setReplied(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 UnsupportedOperationException
- Returns:
- a message to which this is a reply to
- Throws:
UnsupportedOperationException- if this method is not supported by the message implementation
-
getReferences
public List<? extends MessageDelegate> getReferences() throws UnsupportedOperationException
- Returns:
- a list of messages related to this one
- Throws:
UnsupportedOperationException- if this method is not supported by the message implementation
-
getInputStream
public InputStream getInputStream()
- Returns:
- an input stream for message data
-
-