@Path(value="/mail_items/{replicatedMailboxUid}")
public interface IMailboxItems
extends IChangelogSupport, ICrudByIdSupport<MailboxItem>, ICountingSupport, ISortingSupport
MailboxItem.
The container is created by the IMailboxFolders service when a new
replicated folder is created.| 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
|
java.util.List<ItemValue<MailboxItem>> |
multipleById(java.util.List<java.lang.Long> ids) |
java.util.List<java.lang.Long> |
recentItems(java.util.Date deliveredOrUpdatedAfter)
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
uploadPart(Stream) |
void |
resync()
Removes extra records (missing on imap server)
|
java.util.List<java.lang.Long> |
sortedIds(SortDescriptor sorted)
Returns all items in a container matching a sort criteria
|
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 value) |
java.lang.String |
uploadPart(Stream part)
Upload an email part (eg.
|
allIds, changeset, changesetById, containerChangelog, filteredChangesetById, getVersion, itemChangelogmultipleDeleteByIdcount@PUT @Path(value="_part") java.lang.String uploadPart(Stream part)
MessageBody.Part.address when creating or updating a MailboxItem.
The uploaded parts need to be cleaned-up explicitly with
removePart(String)part - a re-usable email part.MessageBody.Part.address@GET @Path(value="_unread") java.util.List<java.lang.Long> unreadItems()
ItemValue.internalIdvoid resync()
@GET @Path(value="_recent") java.util.List<java.lang.Long> recentItems(java.util.Date deliveredOrUpdatedAfter)
ItemValue.internalId for MailboxItem
delivered or updated after or at the given date.deliveredOrUpdatedAfter - @DELETE
@Path(value="{partId}/_part")
void removePart(@PathParam(value="partId")
java.lang.String partId)
uploadPart(Stream)partId - an address returned by a previous uploadPart call@GET
@Path(value="{id}/completeById")
ItemValue<MailboxItem> getCompleteById(@PathParam(value="id")
long id)
getCompleteById in interface ICrudByIdSupport<MailboxItem>@POST
@Path(value="id/{id}")
ImapAck updateById(@PathParam(value="id")
long id,
MailboxItem value)
updateById in interface ICrudByIdSupport<MailboxItem>@PUT
@Path(value="id/{id}")
ImapAck createById(@PathParam(value="id")
long id,
MailboxItem value)
createById in interface ICrudByIdSupport<MailboxItem>@PUT ImapItemIdentifier create(MailboxItem value)
@DELETE
@Path(value="id/{id}")
void deleteById(@PathParam(value="id")
long id)
deleteById in interface ICrudByIdSupport<MailboxItem>@POST @Path(value="_multipleById") java.util.List<ItemValue<MailboxItem>> multipleById(java.util.List<java.lang.Long> ids)
@GET
@Path(value="part/{imapUid}/{address}")
@Produces(value="application/octet-stream")
Stream fetch(@PathParam(value="imapUid")
long imapUid,
@PathParam(value="address")
java.lang.String address,
@QueryParam(value="encoding")
java.lang.String encoding,
@QueryParam(value="mime")
java.lang.String mime,
@QueryParam(value="charset")
java.lang.String charset,
@QueryParam(value="filename")
java.lang.String filename)
MessageBody.Part objects from MessageBody.structure.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)@POST
@Path(value="_unexpunge/{itemId}")
ItemIdentifier unexpunge(@PathParam(value="itemId")
long itemId)
itemId - the item id of a deleted or deleted+expunged message@POST @Path(value="_expunge") void expunge()
@GET
@Path(value="eml/{imapUid}")
@Produces(value="message/rfc822")
Stream fetchComplete(@PathParam(value="imapUid")
long imapUid)
imapUid - @PUT @Path(value="_addFlag") Ack addFlag(FlagUpdate flagUpdate)
MailboxItem.flagUpdate - @POST @Path(value="_deleteFlag") Ack deleteFlag(FlagUpdate flagUpdate)
MailboxItem.flagUpdate - @POST @Path(value="_sorted") java.util.List<java.lang.Long> sortedIds(SortDescriptor sorted)
ISortingSupportsortedIds in interface ISortingSupportsorted - sorting criteriaItemValue.internalId sorted@GET
@Path(value="{id}/getForUpdate")
ItemValue<MailboxItem> getForUpdate(@PathParam(value="id")
long id)
message - idCopyright © 2022. All Rights Reserved.