Rémi Kowalski created JAMES-3381:
------------------------------------
Summary: Email/Query implement Limits
Key: JAMES-3381
URL: https://issues.apache.org/jira/browse/JAMES-3381
Project: James Server
Issue Type: New Feature
Components: JMAP
Reporter: Rémi Kowalski
Assignee: Antoine Duprat
h2. WHY
As a user i should be able to limit the number of results i want to receive
from the server.
{{[[ "Email/query",\{
"accountId": "ue150411c",
"limit": 20,
"filter": {
"inMailbox": "myMailboxID"
}
}, "0" ]]}}
The server should be able to have a limit of results he can send for a request,
if the client didn't provided one or a larger than the supported one.
It should then add the {{limit}} field to the response object to make the
client aware of its limit.
{{ "accountId": "ue150411c",
"queryState": "09aa9a075588-780599:0",
"limit": 100,
"ids": [ "Ma783e5cdf5f2deffbc97930a",
"M9bd17497e2a99cb345fc1d0a", ... ]
}, "0" ]]}}
h2. HOW
{{limit: UnsignedInt|null The maximum number of
results to return. If null, no limit presumed. The server MAY choose to
enforce a maximum limit argument. In this case, if a greater value is
given (or if it is null), the limit is clamped to the maximum; the new
limit is returned with the response so the client is aware. If a
negative value is given, the call MUST be rejected with an
invalidArguments error.}}
* in the jmap.properties file, allow to have a propertie 'query.limit' which
will be user to determine the limit used by the server.
* accept the limit value in the request, and limit the result by the minimum
of the client limit and the server limit.
* if a negative value is given reject the request with an invalidArguments
error.`
h2. DOD
* write an integration test demonstrating the limitation of the number of
results by the limit provided by the client
* write an integration test demonstrating the limitation of the number of
results by the limit enforced by the server if no limit from the client
* write an integration test demonstrating the limitation of the number of
results by the limit enforced by the server if a greater limit provided by the
client
* write an integration test demonstrating the limitation of the number of
results by the limit provided by the client if this limit is smaller by the one
enforced by the server.
* write an integration demonstrating that the request is rejected with an
invalidArguments error if the limit in the resquest is negative
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]