Class Paginator
java.lang.Object
com.atlassian.bamboo.plugins.rest.common.Paginator
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Collection<T>
getLast
(Collection<T> input, javax.ws.rs.core.UriInfo uriInfo) static int
getMaxResults
(javax.ws.rs.core.UriInfo uriInfo) static int
getMaxResults
(javax.ws.rs.core.UriInfo uriInfo, int defaultValue) static org.apache.commons.lang3.Range<Integer>
getPaginationRange
(int resultSize, javax.ws.rs.core.UriInfo uriInfo) static <T> org.apache.commons.lang3.Range<Integer>
getPaginationRange
(Collection<T> input, javax.ws.rs.core.UriInfo uriInfo) static org.apache.commons.lang3.Range<Integer>
getPaginationRange
(javax.ws.rs.core.UriInfo uriInfo) static <T> PagerPaginationSupport<T>
getPaginationSupport
(com.atlassian.user.search.page.Pager<T> pager, javax.ws.rs.core.UriInfo uriInfo) static int
getStartIndex
(javax.ws.rs.core.UriInfo uriInfo, int maxResults) static <T> List<T>
paginate
(Collection<T> input, org.apache.commons.lang3.Range<Integer> range)
-
Field Details
-
DEFAULT_MAX_RESULTS
public static final int DEFAULT_MAX_RESULTS- See Also:
-
-
Constructor Details
-
Paginator
public Paginator()
-
-
Method Details
-
getLast
-
getStartIndex
public static int getStartIndex(javax.ws.rs.core.UriInfo uriInfo, int maxResults) -
getMaxResults
public static int getMaxResults(javax.ws.rs.core.UriInfo uriInfo) -
getMaxResults
public static int getMaxResults(javax.ws.rs.core.UriInfo uriInfo, int defaultValue) -
getPaginationRange
public static org.apache.commons.lang3.Range<Integer> getPaginationRange(javax.ws.rs.core.UriInfo uriInfo) -
getPaginationRange
public static org.apache.commons.lang3.Range<Integer> getPaginationRange(int resultSize, javax.ws.rs.core.UriInfo uriInfo) -
getPaginationRange
public static <T> org.apache.commons.lang3.Range<Integer> getPaginationRange(Collection<T> input, javax.ws.rs.core.UriInfo uriInfo) -
getPaginationSupport
public static <T> PagerPaginationSupport<T> getPaginationSupport(com.atlassian.user.search.page.Pager<T> pager, javax.ws.rs.core.UriInfo uriInfo) -
paginate
public static <T> List<T> paginate(Collection<T> input, org.apache.commons.lang3.Range<Integer> range)
-