[ https://issues.apache.org/jira/browse/JAMES-3357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Tellier updated JAMES-3357: ---------------------------------- Parent: JAMES-2884 Issue Type: Sub-task (was: New Feature) > Mailbox/set creation: simple implementation > ------------------------------------------- > > Key: JAMES-3357 > URL: https://issues.apache.org/jira/browse/JAMES-3357 > Project: James Server > Issue Type: Sub-task > Reporter: René Cordier > Priority: Major > Fix For: 3.6.0 > > > This is a first simple implementation of the creation part of Mailbox/set. It > should follow the JMAP core specification section /set > https://jmap.io/spec-core.html#set > *Request* > {code:json} > { > "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], > "methodCalls": [ > [ > "Mailbox/set", > { > "accountId": "JMAP-ID", > "ifInState": null, > "create": { > "TEMP-MAILBOX-ID": { > "name": "mailbox_name", > "namespace": "Personal" > } > } > } > ] > ] > } > {code} > For now, this should be enough. Few notes: > * ifInState is a State and is not managed at the moment, so it should be null > * the Roles will be the ones we already have defined in james, knowing we > probably miss others at the moment (see #1750) > * parentId will be handled in #1737 > * isSubscribed will be handled in #1739 > * sortOrder is not handled yet, we attribute default values depending of the > role (see #1749 ) > * other missing fields are server-set > * namespace is not part of the specs > * rights are handled in #1759 > * for now we can consider role and sortOrder server-set, regarding our > current implementation > *Response* > {code:json} > { > "methodResponses": [ > [ > "Mailbox/set", > { > "accountId": "JMAP-ID", // the requested accountId > "oldState": null, > "newState": null, > "created": { > "TEMP-MAILBOX-ID": { > "id": "0001", > "sortOrder": 10, > "role": "Inbox", > "totalEmails": 0, > "unreadEmails": 0, > "totalThreads": 0, > "unreadThreads": 0, > "myRights": { > "mayReadItems":false, > "mayAddItems":true, > "mayRemoveItems":false, > "maySetSeen":true, > "maySetKeywords":false, > "mayCreateChild":true, > "mayRename":true, > "mayDelete":false, > "maySubmit":false > }, > "quotas":{ > "quotaRoot":{ > "Message":{"used":18,"max":42}, > "Storage":{"used":12} > } > } > } > } > } > ] > ], > "sessionState": "abc" > } > {code} > Notes: > * notCreated will be handled in #1736 > * the core specs say that the response should return in created a map of Ids > to their Mailbox object with the real id, including any properties not sent > by the client (default values ommited by client and server-set values) > * oldState and newState should be null for now, as we don't manage it atm > *DoD* : POJO and serialization of the request and response Mailbox/set for > creation + unit and integration tests -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org