Package net.bluemind.backend.mail.api
Interface IMailboxItems
- All Superinterfaces:
IChangelogSupport
,ICountingSupport
,ICrudByIdSupport<MailboxItem>
,IReadByIdSupport<MailboxItem>
,ISortingSupport
@Path("/mail_items/{replicatedMailboxUid}")
public interface IMailboxItems
extends IChangelogSupport, ICrudByIdSupport<MailboxItem>, ICountingSupport, ISortingSupport
Container of
MailboxItem
.
The container is created by the IMailboxFolders
service when a new
replicated folder is created.-
Method Summary
Modifier and TypeMethodDescriptionaddFlag
(FlagUpdate flagUpdate) Add one flag to multipleMailboxItem
.create
(MailboxItem value) createById
(long id, MailboxItem value) void
deleteById
(long id) deleteFlag
(FlagUpdate flagUpdate) Delete one flag to multipleMailboxItem
.void
expunge()
Mark deleted items as ready for removal.Fetch a single part from an email mime tree.fetchComplete
(long imapUid) getForUpdate
(long id) Decompose EML in temporary parts, useful to update draftsmultipleUnexpungeById
(List<Long> itemIds) Re-injects multiple items into the current folderrecentItems
(Date deliveredOrUpdatedAfter) Get the list ofItemValue.internalId
forMailboxItem
delivered or updated after or at the given date.void
removePart
(String partId) Remove a part uploaded throughuploadPart(Stream)
unexpunge
(long itemId) Re-injects a deleted item into the current folderGet the list of unread items, applying the per-user overlay when dealing with a shared folder.updateById
(long id, MailboxItem value) uploadPart
(Stream part) Upload an email part (eg.Methods inherited from interface net.bluemind.core.container.api.IChangelogSupport
allIds, changeset, changesetById, filteredChangesetById, getVersion, itemChangelog
Methods inherited from interface net.bluemind.core.container.api.ICountingSupport
count
Methods inherited from interface net.bluemind.core.container.api.ICrudByIdSupport
multipleDeleteById, multipleDeleteById
Methods inherited from interface net.bluemind.core.container.api.IReadByIdSupport
getCompleteById, multipleGetById
Methods inherited from interface net.bluemind.core.container.api.ISortingSupport
sortedIds
-
Method Details
-
uploadPart
Upload an email part (eg. attachment, html body). The returned address can be used asMessageBody.Part.address
when creating or updating aMailboxItem
. The uploaded parts need to be cleaned-up explicitly withremovePart(String)
- Parameters:
part
- a re-usable email part.- Returns:
- an address usable as
MessageBody.Part.address
-
unreadItems
Get the list of unread items, applying the per-user overlay when dealing with a shared folder.- Returns:
- the list of
ItemValue.internalId
-
recentItems
Get the list ofItemValue.internalId
forMailboxItem
delivered or updated after or at the given date.- Parameters:
deliveredOrUpdatedAfter
-- Returns:
-
removePart
Remove a part uploaded throughuploadPart(Stream)
- Parameters:
partId
- an address returned by a previousuploadPart
call
-
updateById
- Specified by:
updateById
in interfaceICrudByIdSupport<MailboxItem>
-
createById
- Specified by:
createById
in interfaceICrudByIdSupport<MailboxItem>
-
create
-
deleteById
@DELETE @Path("id/{id}") void deleteById(@PathParam("id") long id) - Specified by:
deleteById
in interfaceICrudByIdSupport<MailboxItem>
-
fetch
@GET @Path("part/{imapUid}/{address}") @Produces("application/octet-stream") Stream fetch(@PathParam("imapUid") long imapUid, @PathParam("address") String address, @QueryParam("encoding") String encoding, @QueryParam("mime") String mime, @QueryParam("charset") String charset, @QueryParam("filename") String filename) Fetch a single part from an email mime tree. The address, encoding invalid input: '&' charset are specified in theMessageBody.Part
objects fromMessageBody.structure
.- Parameters:
imapUid
-address
-encoding
- 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)- Returns:
- a stream of the (optionally) decoded part
-
unexpunge
Re-injects a deleted item into the current folder- Parameters:
itemId
- the item id of a deleted or deleted+expunged message- Returns:
-
multipleUnexpungeById
Re-injects multiple items into the current folder- Parameters:
itemIds
- the item ids of deleted or deleted+expunged messages- Returns:
-
expunge
@POST @Path("_expunge") void expunge()Mark deleted items as ready for removal. Physical will removal will occur later (cyr_expire invalid input: '&' co) -
fetchComplete
@GET @Path("eml/{imapUid}") @Produces("message/rfc822") Stream fetchComplete(@PathParam("imapUid") long imapUid) - Parameters:
imapUid
-- Returns:
-
addFlag
Add one flag to multipleMailboxItem
.- Parameters:
flagUpdate
-- Returns:
- the new container version
-
deleteFlag
Delete one flag to multipleMailboxItem
.- Parameters:
flagUpdate
-- Returns:
- the new container version
-
getForUpdate
Decompose EML in temporary parts, useful to update drafts- Parameters:
message
- id- Returns:
- message structure with temporary addresses
-