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 Details

    • uploadPart

      @PUT @Path("_part") String uploadPart(Stream part)
      Upload an email part (eg. attachment, html body). The returned address can be used as MessageBody.Part.address when creating or updating a MailboxItem. The uploaded parts need to be cleaned-up explicitly with removePart(String)
      Parameters:
      part - a re-usable email part.
      Returns:
      an address usable as MessageBody.Part.address
    • unreadItems

      @GET @Path("_unread") List<Long> 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 @Path("_recent") List<Long> recentItems(Date deliveredOrUpdatedAfter)
      Get the list of ItemValue.internalId for MailboxItem delivered or updated after or at the given date.
      Parameters:
      deliveredOrUpdatedAfter -
      Returns:
    • removePart

      @DELETE @Path("{partId}/_part") void removePart(@PathParam("partId") String partId)
      Remove a part uploaded through uploadPart(Stream)
      Parameters:
      partId - an address returned by a previous uploadPart call
    • updateById

      @POST @Path("id/{id}") ImapAck updateById(@PathParam("id") long id, MailboxItem value)
      Specified by:
      updateById in interface ICrudByIdSupport<MailboxItem>
    • createById

      @PUT @Path("id/{id}") ImapAck createById(@PathParam("id") long id, MailboxItem value)
      Specified by:
      createById in interface ICrudByIdSupport<MailboxItem>
    • create

      @PUT ImapItemIdentifier create(MailboxItem value)
    • deleteById

      @DELETE @Path("id/{id}") void deleteById(@PathParam("id") long id)
      Specified by:
      deleteById in interface ICrudByIdSupport<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 the MessageBody.Part objects from MessageBody.structure.
      Parameters:
      imapUid -
      address -
      encoding - set null to fetch pristine part
      mime - override the mime type of the response
      charset - override the charset of the response
      filename - set a part name (useful for download purpose)
      Returns:
      a stream of the (optionally) decoded part
    • unexpunge

      @POST @Path("_unexpunge/{itemId}") ItemIdentifier unexpunge(@PathParam("itemId") long itemId)
      Re-injects a deleted item into the current folder
      Parameters:
      itemId - the item id of a deleted or deleted+expunged message
      Returns:
    • multipleUnexpungeById

      @POST @Path("_multipleUnexpunge") List<ItemIdentifier> multipleUnexpungeById(List<Long> itemIds)
      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

      @PUT @Path("_addFlag") Ack addFlag(FlagUpdate flagUpdate)
      Add one flag to multiple MailboxItem.
      Parameters:
      flagUpdate -
      Returns:
      the new container version
    • deleteFlag

      @POST @Path("_deleteFlag") Ack deleteFlag(FlagUpdate flagUpdate)
      Delete one flag to multiple MailboxItem.
      Parameters:
      flagUpdate -
      Returns:
      the new container version
    • getForUpdate

      @GET @Path("{id}/getForUpdate") ItemValue<MailboxItem> getForUpdate(@PathParam("id") long id)
      Decompose EML in temporary parts, useful to update drafts
      Parameters:
      message - id
      Returns:
      message structure with temporary addresses