| org.columba.mail.folder.IMailbox
All known Subclasses: org.columba.mail.folder.AbstractMessageFolder,
IMailbox | public interface IMailbox extends IMailFolder(Code) | | Every mailbox which actually containss message should implement this
interface.
Note, that this also means to subclass
Folder .
author: fdietz |
Method Summary | |
public Object | addMessage(InputStream in) | public Object | addMessage(InputStream in, Attributes attributes, Flags flags) | public boolean | exists(Object uid) Checks if message with uid exists in this folder.
Parameters: uid - UID of message boolean true, if message exists. | public void | expungeFolder() | public Header | getAllHeaderFields(Object uid) Get all email headers. | public Object | getAttribute(Object uid, String key) Gets a attribute from the message
Parameters: uid - The UID of the message Parameters: key - The name of the attribute (e.g. | public Attributes | getAttributes(Object uid) | public File | getDirectoryFile() | IFilterList | getFilterList() | public Flags | getFlags(Object uid) Gets the Flags of the message. | public Header | getHeaderFields(Object uid, String[] keys) Gets all specified headerfields. | public IHeaderList | getHeaderList() Return list of headers. | Object | getLastSelection() | public IMailboxInfo | getMessageFolderInfo() | public InputStream | getMessageSourceStream(Object uid) Gets the InputStream of the complete messagesource. | public InputStream | getMimePartBodyStream(Object uid, Integer[] address) Gets the InputStream from the body of the mimepart. | public InputStream | getMimePartSourceStream(Object uid, Integer[] address) Gets the InputStream from the complete mimepart. | public MimeTree | getMimePartTree(Object uid) Return mimepart structure. | IStatusObservable | getObservable() | public Object[] | getUids() Return array of uids this folder contains. | public void | innerCopy(IMailbox destFolder, Object[] uids) Copy messages identified by UID to this folder.
This method is necessary for optimization reasons.
Think about using local and remote folders. | public boolean | isInboxFolder() | public boolean | isReadOnly() | public boolean | isTrashFolder() | abstract public void | markMessage(Object[] uids, int variant) Mark messages as read/flagged/expunged/etc. | public void | removeMessage(Object uid) | public Object[] | searchMessages(IFilter filter) | public Object[] | searchMessages(IFilter filter, Object[] uids) | public void | setAttribute(Object uid, String key, Object value) Set attribute for message with UID. | void | setLastSelection(Object lastSel) |
addMessage | public Object addMessage(InputStream in) throws Exception(Code) | | Adds a message to this Mailbox
Parameters: in - The message InputStream The new uid of the added message or null if not defined throws: Exception - |
addMessage | public Object addMessage(InputStream in, Attributes attributes, Flags flags) throws Exception(Code) | | Adds a message to this Mailbox
Parameters: in - The message InputStream Parameters: attributes - The attributes of the message Parameters: flags - the flags of the message The new uid of the added message or null if not defined throws: Exception - |
exists | public boolean exists(Object uid) throws Exception(Code) | | Checks if message with uid exists in this folder.
Parameters: uid - UID of message boolean true, if message exists. False, otherwise. throws: Exception - |
expungeFolder | public void expungeFolder() throws Exception(Code) | | Removes all messages which are marked as expunged
throws: Exception - |
getAllHeaderFields | public Header getAllHeaderFields(Object uid) throws Exception(Code) | | Get all email headers.
Parameters: uid - message uid complete email headers throws: Exception - |
getAttribute | public Object getAttribute(Object uid, String key) throws Exception(Code) | | Gets a attribute from the message
Parameters: uid - The UID of the message Parameters: key - The name of the attribute (e.g. "columba.subject","columba.size") throws: Exception - |
getAttributes | public Attributes getAttributes(Object uid) throws Exception(Code) | | Gets the attributes from the message
Parameters: uid - The UID of the message throws: Exception - |
getDirectoryFile | public File getDirectoryFile()(Code) | | |
getFlags | public Flags getFlags(Object uid) throws Exception(Code) | | Gets the Flags of the message.
Parameters: uid - The UID of the message throws: Exception - |
getHeaderFields | public Header getHeaderFields(Object uid, String[] keys) throws Exception(Code) | | Gets all specified headerfields. An example headerfield might be
"Subject" or "From" (take care of lower/uppercaseletters).
Note, that you should use getAttributes() for fetching the internal
headerfields (for example: columba.subject, columba.flags.seen, etc.).
This method first tries to find the requested header in the header cache
(@see CachedFolder). If the headerfield is not cached, the message source
is parsed.
Parameters: uid - The uid of the desired message Parameters: keys - The keys like defined in e.g. RFC2822 A Headercontaining the headerfields if they were present throws: Exception - |
getMessageSourceStream | public InputStream getMessageSourceStream(Object uid) throws Exception(Code) | | Gets the InputStream of the complete messagesource.
Parameters: uid - The UID of the message throws: Exception - |
getMimePartBodyStream | public InputStream getMimePartBodyStream(Object uid, Integer[] address) throws Exception(Code) | | Gets the InputStream from the body of the mimepart. This excludes the
header. If the stream was encoded with QuotedPrintable or Base64 decoding
is already done.
Parameters: uid - The UID of the message Parameters: address - The address of the mimepart throws: Exception - |
getMimePartSourceStream | public InputStream getMimePartSourceStream(Object uid, Integer[] address) throws Exception(Code) | | Gets the InputStream from the complete mimepart. This includes the
header.
Parameters: uid - The UID of the message Parameters: address - address The address of the mimepart throws: Exception - |
getMimePartTree | public MimeTree getMimePartTree(Object uid) throws Exception(Code) | | Return mimepart structure. See MimePartTree for more
details.
Parameters: uid - UID of message MimePartTree return mimepart structure throws: Exception - |
getUids | public Object[] getUids() throws Exception(Code) | | Return array of uids this folder contains.
Object[] array of all UIDs this folder contains |
innerCopy | public void innerCopy(IMailbox destFolder, Object[] uids) throws Exception(Code) | | Copy messages identified by UID to this folder.
This method is necessary for optimization reasons.
Think about using local and remote folders. If we would have only methods
to add/remove messages this wouldn't be very efficient when moving
messages between for example IMAP folders on the same server. We would
have to download a complete message to remove it and then upload it again
to add it to the destination folder.
Using the innercopy method the IMAP server can use its COPY command to
move the message on the server-side.
Parameters: destFolder - the destination folder of the copy operation Parameters: uids - an array of UID's identifying the messages throws: Exception - |
isInboxFolder | public boolean isInboxFolder()(Code) | | |
isReadOnly | public boolean isReadOnly()(Code) | | Is this mailbox read-only?
|
isTrashFolder | public boolean isTrashFolder()(Code) | | |
markMessage | abstract public void markMessage(Object[] uids, int variant) throws Exception(Code) | | Mark messages as read/flagged/expunged/etc.
See MarkMessageCommand for more information especially concerning
the variant value.
Parameters: uid - array of UIDs Parameters: variant - variant can be a value between 0 and 6 throws: Exception - |
setAttribute | public void setAttribute(Object uid, String key, Object value) throws Exception(Code) | | Set attribute for message with UID.
Parameters: uid - UID of message Parameters: key - name of attribute (e.g."columba.subject"); Parameters: value - value of attribute throws: Exception - |
setLastSelection | void setLastSelection(Object lastSel)(Code) | | |
|
|