Class PaginationSupportAdaptor<T>
- java.lang.Object
-
- bucket.core.actions.PaginationSupport<T>
-
- com.atlassian.confluence.pages.actions.PaginationSupportAdaptor<T>
-
- All Implemented Interfaces:
PaginationSupport<T>
public class PaginationSupportAdaptor<T> extends 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
Constructors Constructor Description PaginationSupportAdaptor(long totalItems, int pageSize, PageResponse<T> pageResponse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List
getItems()
List<T>
getPage()
Returns a subset of the list of items passed in, based on startIndex and the page sizeint
getTotal()
Returns the total number of items in the list-
Methods inherited from class bucket.core.actions.PaginationSupport
getNextStartIndex, getNextStartIndexes, getNiceEndIndex, getNiceStartIndex, getPageSize, getPreviousStartIndex, getPreviousStartIndexes, getStartIndex, getStartIndexValue, setItems, setPageSize, setStartIndex, setTotal
-
-
-
-
Constructor Detail
-
PaginationSupportAdaptor
public PaginationSupportAdaptor(long totalItems, int pageSize, PageResponse<T> pageResponse)
-
-
Method Detail
-
getItems
public List getItems()
- Overrides:
getItems
in classPaginationSupport<T>
-
getPage
public List<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
-
-