org.apache.geronimo.javamail.store.imap
Class IMAPAttachedMessage
java.lang.Object
javax.mail.Message
javax.mail.internet.MimeMessage
org.apache.geronimo.javamail.store.imap.IMAPMessage
org.apache.geronimo.javamail.store.imap.IMAPAttachedMessage
- All Implemented Interfaces:
- MimePart, Part
public class IMAPAttachedMessage
- extends IMAPMessage
A nested message attachement inside of another
IMAP message. This is a less-functional version
of the top-level message.
Method Summary |
protected void |
checkValidity()
Check if this message is still valid. |
Flags |
getFlags()
Return a copy the flags associated with this message. |
int |
getSize()
Get the size of this message part. |
boolean |
isExpunged()
Check if the outer-most message has been expunged. |
boolean |
isSet(Flags.Flag flag)
Check whether the supplied flag is set. |
void |
setFlags(Flags flag,
boolean set)
Set or clear a flag value. |
Methods inherited from class org.apache.geronimo.javamail.store.imap.IMAPMessage |
addFrom, addHeader, addHeaderLine, addRecipients, checkValidity, evaluateFetch, getAllHeaderLines, getAllHeaders, getConnection, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFrom, getHeader, getHeader, getInReplyTo, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getMessageID, getNonMatchingHeaderLines, getNonMatchingHeaders, getReceivedDate, getRecipients, getReplyTo, getSender, getSentDate, getSubject, isMimeType, loadBodyStructure, loadContent, loadEnvelope, loadFlags, loadHeaders, mergeHeaders, releaseConnection, removeHeader, saveChanges, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setExpunged, setFrom, setHeader, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, updateBodyStructure, updateEnvelope, updateHeader, updateHeader, updateHeader, updateHeaders, writeTo |
Methods inherited from class javax.mail.internet.MimeMessage |
addRecipients, createInternetHeaders, createMimeMessage, getAllRecipients, getContent, getFileName, getInputStream, getRawInputStream, parse, reply, setContent, setContent, setFileName, setFrom, setText, setText, setText, updateHeaders, updateMessageID, writeTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parent
protected IMAPMessage parent
IMAPAttachedMessage
public IMAPAttachedMessage(IMAPMessage parent,
String section,
IMAPEnvelope envelope,
IMAPBodyStructure bodyStructure)
- Constructor for an attached message part.
- Parameters:
parent
- The parent message (outer-most message).section
- The section identifier for this embedded part
in IMAP section format. This will identify
the part hierarchy used to locate this part within
the message.envelope
- The Envelope that describes this part.bodyStructure
- The Body structure element that describes this part.
checkValidity
protected void checkValidity()
throws MessagingException
- Check if this message is still valid. This is
delegated to the outer-most message.
- Overrides:
checkValidity
in class IMAPMessage
- Throws:
MessagingException
isExpunged
public boolean isExpunged()
- Check if the outer-most message has been expunged.
- Overrides:
isExpunged
in class Message
- Returns:
- true if the message has been expunged.
getSize
public int getSize()
- Get the size of this message part.
- Specified by:
getSize
in interface Part
- Overrides:
getSize
in class IMAPMessage
- Returns:
- The estimate size of this message part, in bytes.
getFlags
public Flags getFlags()
throws MessagingException
- Return a copy the flags associated with this message.
- Overrides:
getFlags
in class IMAPMessage
- Returns:
- a copy of the flags for this message
- Throws:
MessagingException
- if there was a problem accessing the Store
isSet
public boolean isSet(Flags.Flag flag)
throws MessagingException
- Check whether the supplied flag is set.
The default implementation checks the flags returned by
getFlags()
.
- Overrides:
isSet
in class IMAPMessage
- Parameters:
flag
- the flags to check for
- Returns:
- true if the flags is set
- Throws:
MessagingException
- if there was a problem accessing the Store
setFlags
public void setFlags(Flags flag,
boolean set)
throws MessagingException
- Set or clear a flag value.
- Overrides:
setFlags
in class IMAPMessage
- Parameters:
flags
- The set of flags to effect.set
- The value to set the flag to (true or false).
- Throws:
MessagingException
Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.