Hi,
I went ahead and prototyped the pagination support both in the backend and the
REST API within the boundaries of inventory.
Because this is a generic feature, it's been agreed that this stuff would
deserve a place of its own so that it can be shared amongst the various
hawkular components.
There are 2 aspects of the paging:
* support in backend - This basically only revolves around the specification
of the paging requirements and a list "wrapper" that adds paging context to
the results. The way how the paging will be implemented will differ in each
component.
https://github.com/hawkular/hawkular-inventory/tree/master/api/src/main/j...
* support in the REST API - This means to translate the query parameters with
the paging specification into paging java API and transform the results from
the backend into the set of headers attached to the response.
The support for paging in REST in inventory is contained in these classes:
https://github.com/hawkular/hawkular-inventory/blob/master/rest-servlet/s...
https://github.com/hawkular/hawkular-inventory/blob/master/rest-servlet/s...
https://github.com/hawkular/hawkular-inventory/blob/master/rest-servlet/s...
https://github.com/hawkular/hawkular-inventory/blob/master/rest-servlet/s...
https://github.com/hawkular/hawkular-inventory/blob/master/rest-servlet/s...
Both the backend and the REST support were either taken from or were heavily
inspired by the paging support in RHQ.
Where do you think these should live? Do we have a repo for common stuff? I
imagine we will have to have 2 separate common modules so that we don't drag
jaxrs deps into core components.
Cheers,
Lukas