feat: Create pagination annotation
6 unresolved threads
Closed
requested to merge zacharysabourin/eclipsefdn-api-common:zacharysabourin/master/19 into master
6 unresolved threads
Compare changes
Files
2@@ -6,12 +6,14 @@
@@ -6,12 +6,14 @@
@@ -23,6 +25,7 @@ import javax.servlet.http.HttpServletResponse;
@@ -23,6 +25,7 @@ import javax.servlet.http.HttpServletResponse;
@@ -39,11 +42,13 @@ import org.slf4j.Logger;
@@ -39,11 +42,13 @@ import org.slf4j.Logger;
* Adds pagination and Link headers to the response by slicing the response entity if its a list entity. This will not
@@ -69,12 +74,19 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
@@ -69,12 +74,19 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)
@@ -108,10 +120,11 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
@@ -108,10 +120,11 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
* Gets a header value if available, checking first the servlet response then the mutable response wrapper.
@@ -142,10 +155,13 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
@@ -142,10 +155,13 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
* Gets the current requested page, rounding down to max if larger than the max page number, and up if below 1.
@@ -167,7 +183,8 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
@@ -167,7 +183,8 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
* Allows for external bindings to affect the current page size, defaulting to the internal set configuration.
@@ -185,7 +202,8 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
@@ -185,7 +202,8 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
@@ -201,11 +219,12 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
@@ -201,11 +219,12 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
* Builds an href for a paginated link using the BaseUri UriBuilder from the UriInfo object, replacing just the page
@@ -219,9 +238,10 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
@@ -219,9 +238,10 @@ public class PaginatedResultsFilter implements ContainerResponseFilter {
* @return the passed number if its within the size of the given array, 0 if the number is negative, and the array