use of io.crnk.core.queryspec.pagingspec.PagingSpecUrlBuilder in project crnk-framework by crnk-project.
the class ResponseRepositoryAdapter method enrichPageLinksInformation.
private LinksInformation enrichPageLinksInformation(LinksInformation linksInformation, ResourceList<?> resources, QueryAdapter queryAdapter, RepositoryRequestSpec requestSpec) {
if (linksInformation == null) {
// use default implementation if no link information
// provided by resource
linksInformation = new DefaultPagedLinksInformation();
}
if (linksInformation instanceof PagedLinksInformation) {
PagingSpecUrlBuilder urlBuilder = new PagingSpecUrlBuilder(moduleRegistry.getResourceRegistry(), requestSpec);
requestSpec.getResponseResourceInformation().getPagingBehavior().build((PagedLinksInformation) linksInformation, resources, queryAdapter, urlBuilder);
}
return linksInformation;
}
Aggregations