Class PaginationSupportAdaptor<T>
java.lang.Object
bucket.core.actions.PaginationSupport<T>
com.atlassian.confluence.pages.actions.PaginationSupportAdaptor<T>
- All Implemented Interfaces:
PaginationSupport<T>
This class will wrap an instance of PageResponse and make it behave like PaginationSupport
Note: we need that so that we could reuse all VM code
- Since:
- 7.5.0
-
Field Summary
Fields inherited from class bucket.core.actions.PaginationSupport
DEFAULT_COUNT_ON_EACH_PAGE, DEFAULT_PAGE_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionPaginationSupportAdaptor
(long totalItems, int pageSize, PageResponse<T> pageResponse) -
Method Summary
Methods inherited from class bucket.core.actions.PaginationSupport
getNextStartIndex, getNextStartIndexes, getNiceEndIndex, getNiceStartIndex, getPageSize, getPreviousStartIndex, getPreviousStartIndexes, getStartIndex, getStartIndexValue, setItems, setPageSize, setStartIndex, setTotal
-
Constructor Details
-
PaginationSupportAdaptor
-
-
Method Details
-
getItems
- Overrides:
getItems
in classPaginationSupport<T>
-
getPage
Description copied from class:PaginationSupport
Returns a subset of the list of items passed in, based on startIndex and the page size- Specified by:
getPage
in interfacePaginationSupport<T>
- Overrides:
getPage
in classPaginationSupport<T>
- Returns:
- a subset of the list of items passed in, based on startIndex and the page size
-
getTotal
public int getTotal()Description copied from interface:PaginationSupport
Returns the total number of items in the list- Specified by:
getTotal
in interfacePaginationSupport<T>
- Overrides:
getTotal
in classPaginationSupport<T>
- Returns:
- total number of items in the list
-