Add ability to enable/disable pagination on methods
In order to more easily support our calls, we should add a way of bypassing pagination to return all results for a call when needed. While we can always paginate, for some endpoints it's easier to skip the logic than to paginate results that will always be used in totality (like for instance, Working Groups, as we don't plan on having more than a few dozen at most). As we may add better pagination support in the future for more complex data types like maps, this also can help us avoid issues where content gets unnecessarily split. The easiest way to track these would be to add a new annotation of @Pagination
with an enabled
boolean property. We'll add more properties in the future but will start with this one.
A few notes on implementation:
- You'll need to cast the ContainerRequestContext to get access to the triggered Java method,
((PostMatchContainerRequestContext) requestContext).getResourceMethod()
- We have an implementation that does some things with annotations in requests in Membership.eclipse.org under
org.eclipsefoundation.membership.portal.request.OrganizationalRoleFilter
if you'd like some examples. - For now I'm only aiming for method level support, but in the future we may add class level support. Not sure if we'd use it as its already a low-use use case, but it may be good for consistency with how some other JAX-RS things work.