public class ImapMailboxRecordsService extends BaseMailboxRecordsService implements IInternalMailboxItems
IInternalMailboxItems.ImapClient, IInternalMailboxItems.ImapCommandRunner| Modifier and Type | Field and Description |
|---|---|
static java.lang.Integer |
DEFAULT_TIMEOUT |
container, context, mailboxUniqueId, optRecordsLocation, rbac, recordStore, replicaStore, storeService| Constructor and Description |
|---|
ImapMailboxRecordsService(javax.sql.DataSource ds,
Container cont,
BmContext context,
java.lang.String mailboxUniqueId,
MailboxRecordStore recordStore,
ContainerStoreService<MailboxRecord> storeService) |
| Modifier and Type | Method and Description |
|---|---|
Ack |
addFlag(FlagUpdate flagUpdate)
Add one flag to multiple
MailboxItem. |
ImapItemIdentifier |
create(MailboxItem value) |
ImapAck |
createById(long id,
MailboxItem value) |
void |
deleteById(long id) |
Ack |
deleteFlag(FlagUpdate flagUpdate)
Delete one flag to multiple
MailboxItem. |
void |
expunge()
Mark deleted items as ready for removal.
|
Stream |
fetch(long imapUid,
java.lang.String address,
java.lang.String encoding,
java.lang.String mime,
java.lang.String charset,
java.lang.String filename)
Fetch a single part from an email mime tree.
|
Stream |
fetchComplete(long imapUid) |
ItemValue<MailboxItem> |
getCompleteById(long id) |
ItemValue<MailboxItem> |
getForUpdate(long id)
Decompose EML in temporary parts, useful to update drafts
|
IInternalMailboxItems.ImapCommandRunner |
imapExecutor() |
java.lang.String |
imapFolder() |
java.util.List<ItemIdentifier> |
multiCreate(java.util.List<MailboxItem> items) |
java.util.List<ItemValue<MailboxItem>> |
multipleById(java.util.List<java.lang.Long> ids) |
void |
multipleDeleteById(java.util.List<java.lang.Long> ids) |
java.util.List<java.lang.Long> |
recentItems(java.util.Date d)
Get the list of
ItemValue.internalId for MailboxItem
delivered or updated after or at the given date. |
void |
removePart(java.lang.String partId)
Remove a part uploaded through
IMailboxItems.uploadPart(Stream) |
void |
resync()
Removes extra records (missing on imap server)
|
ItemIdentifier |
unexpunge(long itemId)
Re-injects a deleted item into the current folder
|
java.util.List<java.lang.Long> |
unreadItems()
Get the list of unread items, applying the per-user overlay when dealing with
a shared folder.
|
ImapAck |
updateById(long id,
MailboxItem mail) |
java.lang.String |
uploadPart(Stream part)
Upload an email part (eg.
|
adapt, allIds, changeset, changesetById, checkExistOnBackend, containerChangelog, count, fetchCompleteOIO, filteredChangesetById, getVersion, itemChangelog, sortedIdsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsortedIdsallIds, changeset, changesetById, containerChangelog, filteredChangesetById, getVersion, itemChangelogcountpublic ImapMailboxRecordsService(javax.sql.DataSource ds,
Container cont,
BmContext context,
java.lang.String mailboxUniqueId,
MailboxRecordStore recordStore,
ContainerStoreService<MailboxRecord> storeService)
public java.lang.String imapFolder()
imapFolder in interface IInternalMailboxItemspublic IInternalMailboxItems.ImapCommandRunner imapExecutor()
imapExecutor in interface IInternalMailboxItemspublic ItemValue<MailboxItem> getCompleteById(long id)
getCompleteById in interface IMailboxItemsgetCompleteById in interface ICrudByIdSupport<MailboxItem>public void deleteById(long id)
deleteById in interface IMailboxItemsdeleteById in interface ICrudByIdSupport<MailboxItem>public void expunge()
IMailboxItemsexpunge in interface IMailboxItemspublic void resync()
IMailboxItemsresync in interface IMailboxItemspublic ImapAck updateById(long id, MailboxItem mail)
updateById in interface IMailboxItemsupdateById in interface ICrudByIdSupport<MailboxItem>public ImapItemIdentifier create(MailboxItem value)
create in interface IMailboxItemspublic ImapAck createById(long id, MailboxItem value)
createById in interface IMailboxItemscreateById in interface ICrudByIdSupport<MailboxItem>public java.util.List<ItemIdentifier> multiCreate(java.util.List<MailboxItem> items)
multiCreate in interface IInternalMailboxItemspublic java.util.List<ItemValue<MailboxItem>> multipleById(java.util.List<java.lang.Long> ids)
multipleById in interface IMailboxItemspublic ItemIdentifier unexpunge(long itemId)
IMailboxItemsunexpunge in interface IMailboxItemsitemId - the item id of a deleted or deleted+expunged messagepublic Stream fetchComplete(long imapUid)
fetchComplete in interface IMailboxItemsfetchComplete in class BaseMailboxRecordsServicepublic Stream fetch(long imapUid, java.lang.String address, java.lang.String encoding, java.lang.String mime, java.lang.String charset, java.lang.String filename)
IMailboxItemsMessageBody.Part objects from MessageBody.structure.fetch in interface IMailboxItemsencoding - set null to fetch pristine partmime - override the mime type of the responsecharset - override the charset of the responsefilename - set a part name (useful for download purpose)public java.lang.String uploadPart(Stream part)
IMailboxItemsMessageBody.Part.address when creating or updating a MailboxItem.
The uploaded parts need to be cleaned-up explicitly with
IMailboxItems.removePart(String)uploadPart in interface IMailboxItemspart - a re-usable email part.MessageBody.Part.addresspublic void removePart(java.lang.String partId)
IMailboxItemsIMailboxItems.uploadPart(Stream)removePart in interface IMailboxItemspartId - an address returned by a previous uploadPart callpublic java.util.List<java.lang.Long> unreadItems()
IMailboxItemsunreadItems in interface IMailboxItemsItemValue.internalIdpublic java.util.List<java.lang.Long> recentItems(java.util.Date d)
IMailboxItemsItemValue.internalId for MailboxItem
delivered or updated after or at the given date.recentItems in interface IMailboxItemspublic void multipleDeleteById(java.util.List<java.lang.Long> ids)
multipleDeleteById in interface ICrudByIdSupport<MailboxItem>public Ack addFlag(FlagUpdate flagUpdate)
IMailboxItemsMailboxItem.addFlag in interface IMailboxItemspublic Ack deleteFlag(FlagUpdate flagUpdate)
IMailboxItemsMailboxItem.deleteFlag in interface IMailboxItemspublic ItemValue<MailboxItem> getForUpdate(long id)
IMailboxItemsgetForUpdate in interface IMailboxItemsCopyright © 2022. All Rights Reserved.