public class Paginator extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_RESULTS |
Constructor and Description |
---|
Paginator() |
Modifier and Type | Method and Description |
---|---|
static <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 <W,T> PageResponse<T> |
getPage(Collection<W> input,
PageRequest pageRequest,
com.google.common.base.Function<? super W,T> transformer)
Deprecated.
since 5.10 use
PaginationService instead |
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 |
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) |
public static final int DEFAULT_MAX_RESULTS
public static <T> Collection<T> getLast(Collection<T> input, javax.ws.rs.core.UriInfo uriInfo)
public static int getStartIndex(javax.ws.rs.core.UriInfo uriInfo, int maxResults)
public static int getMaxResults(javax.ws.rs.core.UriInfo uriInfo)
public static int getMaxResults(javax.ws.rs.core.UriInfo uriInfo, int defaultValue)
public static org.apache.commons.lang3.Range<Integer> getPaginationRange(javax.ws.rs.core.UriInfo uriInfo)
public static <T> org.apache.commons.lang3.Range<Integer> getPaginationRange(Collection<T> input, javax.ws.rs.core.UriInfo uriInfo)
public static <T> PagerPaginationSupport getPaginationSupport(com.atlassian.user.search.page.Pager<T> pager, javax.ws.rs.core.UriInfo uriInfo)
public static <T> List<T> paginate(Collection<T> input, org.apache.commons.lang3.Range<Integer> range)
@NotNull @Deprecated public static <W,T> PageResponse<T> getPage(@NotNull Collection<W> input, @NotNull PageRequest pageRequest, @NotNull com.google.common.base.Function<? super W,T> transformer)
PaginationService
insteadW
- domain objectT
- rest objectinput
- full list of domain objectspageRequest
- which page of information requiredtransformer
- to convert domain object into rest objectCopyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.