Class RestPageModel<T>
java.lang.Object
com.atlassian.bamboo.rest.model.AbstractRestModel
com.atlassian.bamboo.rest.model.pagination.RestPageModel<T>
- Type Parameters:
T
- type of page element
REST model representing a page resource.
-
Field Summary
Fields inherited from class com.atlassian.bamboo.rest.model.AbstractRestModel
self
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> RestPageModel<T>
expandable
(@NotNull PageRequest pageRequest) Construct a page model for an expandable result list, without any results yet.static <T> RestPageModel<T>
forItems
(@NotNull PageRequest pageRequest, @NotNull Iterable<T> items) Construct a page model for a result list.static <T> RestPageModel<T>
forItems
(@NotNull PageRequest pageRequest, @NotNull Iterable<T> items, boolean more) Construct a page model for a result list.int
getLimit()
Get the maximum number of items allowed/requested to be returned.int
getStart()
Get the index this page starts from.boolean
isMore()
void
void
Methods inherited from class com.atlassian.bamboo.rest.model.AbstractRestModel
getSelf, setSelf
-
Method Details
-
expandable
Construct a page model for an expandable result list, without any results yet.- Parameters:
pageRequest
- request
-
forItems
public static <T> RestPageModel<T> forItems(@NotNull @NotNull PageRequest pageRequest, @NotNull @NotNull Iterable<T> items) Construct a page model for a result list.- Parameters:
pageRequest
- requestitems
- items for the page
-
forItems
public static <T> RestPageModel<T> forItems(@NotNull @NotNull PageRequest pageRequest, @NotNull @NotNull Iterable<T> items, boolean more) Construct a page model for a result list.- Parameters:
pageRequest
- requestitems
- items for the pagemore
- true, if there are more results and the list is not complete
-
isMore
public boolean isMore() -
getStart
public int getStart()Get the index this page starts from. Data obtained from the page request used to construct this response. -
getLimit
public int getLimit()Get the maximum number of items allowed/requested to be returned. Data obtained from the page request used to construct this response. -
getResults
-
setNext
-
setPrev
-