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 ListgetItems()List<T>getPage()Returns a subset of the list of items passed in, based on startIndex and the page sizeintgetTotal()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:
getItemsin classPaginationSupport<T>
-
getPage
public List<T> getPage()
Description copied from class:PaginationSupportReturns a subset of the list of items passed in, based on startIndex and the page size- Specified by:
getPagein interfacePaginationSupport<T>- Overrides:
getPagein 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:PaginationSupportReturns the total number of items in the list- Specified by:
getTotalin interfacePaginationSupport<T>- Overrides:
getTotalin classPaginationSupport<T>- Returns:
- total number of items in the list
-
-