Class PagerToPageResponseHelper

java.lang.Object
com.atlassian.confluence.dmz.pagination.PagerToPageResponseHelper

public class PagerToPageResponseHelper extends Object
in DMZ; see the package-info.java for rationale.
Since:
5.10
  • Constructor Details

    • PagerToPageResponseHelper

      public PagerToPageResponseHelper()
  • Method Details

    • fromPager

      @Deprecated public static <H, M> PageResponse<M> fromPager(com.atlassian.user.search.page.Pager<H> pager, LimitedRequest limitedRequest, com.google.common.base.Function<H,M> transfromer) throws com.atlassian.user.search.page.PagerException
      Helper to build page responses from atlassian user Pagers
      Type Parameters:
      H - the type of the source object, generally a hibernate object
      M - the type of the model object to produce
      Parameters:
      pager - the atlassian user pager which is the datasource
      limitedRequest - the page request to fetch
      transfromer - the transforming function to apply to convert from the data in the page to the requested model
      Returns:
      a page response fulfilling the request
      Throws:
      com.atlassian.user.search.page.PagerException
    • createFromPager

      public static <H, M> PageResponse<M> createFromPager(com.atlassian.user.search.page.Pager<H> pager, LimitedRequest limitedRequest, Function<H,M> transformer) throws com.atlassian.user.search.page.PagerException
      Helper to build page responses from atlassian user Pagers
      Type Parameters:
      H - the type of the source object, generally a hibernate object
      M - the type of the model object to produce
      Parameters:
      pager - the atlassian user pager which is the datasource
      limitedRequest - the page request to fetch
      transformer - the transforming function to apply to convert from the data in the page to the requested model
      Returns:
      a page response fulfilling the request
      Throws:
      com.atlassian.user.search.page.PagerException
      Since:
      7.0.1