Class MdmPageLinkBuilder

java.lang.Object
ca.uhn.fhir.mdm.api.paging.MdmPageLinkBuilder

public final class MdmPageLinkBuilder extends Object
Builder to generate MdmPageLinkTuple objects, based on a given page of data and the incoming page request.
  • Constructor Details

  • Method Details

    • buildMdmPageLinks

      public static MdmPageLinkTuple buildMdmPageLinks(ca.uhn.fhir.rest.server.servlet.ServletRequestDetails theServletRequestDetails, org.springframework.data.domain.Page<MdmLinkJson> theCurrentPage, MdmPageRequest thePageRequest)
      Generates an MdmPageLinkTuple which contains previous/self/next links for pagination purposes.
      Parameters:
      theServletRequestDetails - the incoming request details. Used to determine server base.
      theCurrentPage - the page of MDM link data. Used for determining if there are next/previous pages available.
      thePageRequest - the incoming Page request, containing requested offset and count. Used for building offset for outgoing URLs.
      Returns:
      the MdmPageLinkTuple
    • buildMdmPageLinks

      public static MdmPageLinkTuple buildMdmPageLinks(String theUrlWithoutPaging, org.springframework.data.domain.Page<MdmLinkJson> theCurrentPage, MdmPageRequest thePageRequest)
    • buildLinkWithOffsetAndCount

      public static String buildLinkWithOffsetAndCount(String theBaseUrl, int theCount, int theOffset)