Interface I_CmsSearchConfigurationPagination

All Known Implementing Classes:
CmsSearchConfigurationPagination

The interface a pagination configuration must implement.
  • Method Details

    • getNumPages

      int getNumPages(long numFound)
      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.
    • getPageNavLength

      Returns the length of a "Google"-like navigation. Should typically be an odd number.
      Returns:
      The length of a "Google"-like navigation.
    • 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 either getSizeOfPage(int) to get the size for a specific page or I_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 use getSizeOfPage(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

      int getSizeOfPage(int pageNum)
      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

      int getStartOfPage(int pageNum)
      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.