Package org.opencms.jsp.search.config
Interface I_CmsSearchConfigurationPagination
- All Known Implementing Classes:
CmsSearchConfigurationPagination
public interface I_CmsSearchConfigurationPagination
The interface a pagination configuration must implement.
-
Method Summary
Modifier and TypeMethodDescriptionint
getNumPages
(long numFound) Calculates the number of pages for the provided number of results.int
Returns the length of a "Google"-like navigation.Returns the request parameter that should be used to send the current page.int
Deprecated.Returns the page sizes as configured for the first pages of the search.int
getSizeOfPage
(int pageNum) Returns the page size for the provided page.int
getStartOfPage
(int pageNum) Returns the index of the first item to show on the given page.
-
Method Details
-
getNumPages
Calculates the number of pages for the provided number of results.- Parameters:
numFound
- the number of results- Returns:
- the number of result pages for the provided number of results.
-
getPageParam
Returns the request parameter that should be used to send the current page.- Returns:
- The request parameter that should be used to send the current page.
-
getPageSize
Deprecated.use eithergetSizeOfPage(int)
to get the size for a specific page orI_CmsSearchControllerPagination.getCurrentPageSize()
to get the size of the current page.Returns the page size of pages that have not explicitely a size set. That means, if you specify the sizes [5,8], meaning the first page should have 5 entries, all others 8, the size 8 is returned by the method. To get the size of a specific page usegetSizeOfPage(int)
.- Returns:
- The page size of pages that have not explicitely a size set.
-
getPageSizes
Returns the page sizes as configured for the first pages of the search. The last provided size is the size of all following pages.- Returns:
- the configured page sizes for the first pages.
-
getSizeOfPage
Returns the page size for the provided page.- Parameters:
pageNum
- the number of the page (starting with 1) for which the size should be returned.- Returns:
- The page size for the provided page.
-
getStartOfPage
Returns the index of the first item to show on the given page.- Parameters:
pageNum
- the number of the page, for which the index of the first item to show on is requested.- Returns:
- the index of the first item to show on the provided page.
-
getSizeOfPage(int)
to get the size for a specific page orI_CmsSearchControllerPagination.getCurrentPageSize()
to get the size of the current page.