Interface PrPaginationService
- All Known Implementing Classes:
DefaultPrPaginationService
public interface PrPaginationService
Service handling operations for pagination.
- Since:
- 2205
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntryWithPaginationDetails(org.springframework.util.MultiValueMap<String, String> header, String url, String queryStringWithoutParams, Long totalCount, Integer limit, Integer offset) Adds entry with pagination details to the header.checkLimit(Integer limit) Checks if the given limit is validcheckOffset(Integer offset) Checks if the given offset is valid
-
Method Details
-
checkOffset
Checks if the given offset is valid- Parameters:
offset- the offset set by the user.- Returns:
- offset if given value is correct; 0 otherwise.
-
checkLimit
Checks if the given limit is valid- Parameters:
limit- the limit set by the user.- Returns:
- limit if input value is correct; 100 otherwise (PAGINATION_DEFAULT_LIMIT)
-
addEntryWithPaginationDetails
void addEntryWithPaginationDetails(org.springframework.util.MultiValueMap<String, String> header, String url, String queryStringWithoutParams, Long totalCount, Integer limit, Integer offset) Adds entry with pagination details to the header.- Parameters:
header- The header that will be used in response.url- The Url of the http request.queryStringWithoutParams- The url string without the offset and limit paramsoffset- The offset represents the position in list from where the result list will start.limit- The limit represents the number of entries that will be selected for the result list.totalCount- The total number of resources of the requested type that exist in the system.
-