You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Matthieu Baechler (JIRA)" <ji...@apache.org> on 2016/05/19 12:56:12 UTC

[jira] [Created] (MAILBOX-268) Make attachment an top-level Entity

Matthieu Baechler created MAILBOX-268:
-----------------------------------------

             Summary: Make attachment an top-level Entity
                 Key: MAILBOX-268
                 URL: https://issues.apache.org/jira/browse/MAILBOX-268
             Project: James Mailbox
          Issue Type: Task
          Components: store
            Reporter: Matthieu Baechler


Attachment should be query-able without any message.
It opens the way to direct download and upload of attachment for Jmap but will also allow attachment de-duplication in storage.

We should create  AttachmentMapper / AttachmentMapperFactory classes.
AttachmentManager should implement :
{code}
void storeAttachment(Attachment)
Attachment getAttachment(AttachmentId)
{code}

We will propose a cassandra implementation.

Attachment table should looks like :
attachmentId (probably a SHA1), payload, type, size

Some test cases :

Asking for a non referenced AttachmentId should throw.
Asking for a referenced AttachmentId should get the attachment.
Asking for a null AttachmentId should throw. 
Asking for a malformed AttachmentId should throw.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org