public interface IMailMessageStorageBatch extends IMailMessageStorage
IMailMessageStorageBatch
- Extends IMailMessageStorage
for mail systems which support to request single header names.EMPTY_RETVAL
Modifier and Type | Method and Description |
---|---|
void |
updateMessageColorLabel(java.lang.String fullName,
int colorLabel)
An optional method that updates the color label of all messages located in given folder.
|
void |
updateMessageFlags(java.lang.String fullName,
int flags,
boolean set)
Updates the flags of all messages located in given folder.
|
appendMessages, copyMessages, deleteMessages, getAllMessages, getAttachment, getDeletedMessages, getImageAttachment, getMessage, getMessages, getNewAndModifiedMessages, getPrimaryContents, getThreadSortedMessages, getUnreadMessages, moveMessages, releaseResources, saveDraft, searchMessages, updateMessageColorLabel, updateMessageFlags
void updateMessageColorLabel(java.lang.String fullName, int colorLabel) throws com.openexchange.exception.OXException
If no mail could be found for a given mail ID, it is treated as a no-op.
The underlying mailing system needs to support some kind of user-definable flags to support this method. Otherwise this method should be left unchanged with an empty body.
The color labels are user flags with the common prefix "cl_"
and its numeric color code appended (currently numbers 0 to
10).
fullName
- The folder full namecolorLabel
- The color label to applycom.openexchange.exception.OXException
- If color label cannot be updatedvoid updateMessageFlags(java.lang.String fullName, int flags, boolean set) throws com.openexchange.exception.OXException
set
is
true
the affected flags denoted by flags
are added; otherwise removed.
If no mail could be found for a given mail ID, it is treated as a no-op.
System flags are:
If mail folder in question supports user flags (storing individual strings per message) the virtual flags can also be updated through
this routine; e.g. MailMessage.FLAG_FORWARDED
.
Moreover this routine checks for any spam related actions; meaning the MailMessage.FLAG_SPAM
shall be enabled/disabled. Thus
the SpamHandler#handleSpam(String, String[], boolean, MailAccess)
/
SpamHandler#handleHam(String, String[], boolean, MailAccess)
methods needs to be executed.
fullName
- The folder full nameflags
- The bit pattern for the flags to alterset
- true
to enable the flags; otherwise false
com.openexchange.exception.OXException
- If system flags cannot be updated