Package ca.uhn.fhir.mdm.api.paging
Class MdmPageLinkBuilder
java.lang.Object
ca.uhn.fhir.mdm.api.paging.MdmPageLinkBuilder
Builder to generate
MdmPageLinkTuple
objects, based on a given page of data and the incoming page request.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
buildLinkWithOffsetAndCount
(String theBaseUrl, int theCount, int theOffset) static MdmPageLinkTuple
buildMdmPageLinks
(ca.uhn.fhir.rest.server.servlet.ServletRequestDetails theServletRequestDetails, org.springframework.data.domain.Page<MdmLinkJson> theCurrentPage, MdmPageRequest thePageRequest) Generates anMdmPageLinkTuple
which contains previous/self/next links for pagination purposes.static MdmPageLinkTuple
buildMdmPageLinks
(String theUrlWithoutPaging, org.springframework.data.domain.Page<MdmLinkJson> theCurrentPage, MdmPageRequest thePageRequest)
-
Constructor Details
-
MdmPageLinkBuilder
public MdmPageLinkBuilder()
-
-
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 anMdmPageLinkTuple
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
-