Class StreamPageRequestsImpl

java.lang.Object
com.atlassian.jira.util.StreamPageRequestsImpl
All Implemented Interfaces:
StreamPageRequests

@PublicApi public final class StreamPageRequestsImpl extends Object implements StreamPageRequests
Since:
10.7.1
  • Constructor Details

    • StreamPageRequestsImpl

      public StreamPageRequestsImpl()
  • Method Details

    • request

      public StreamPageRequest request(@Nullable String cursor, @Nullable Integer limit)
      Creates an instance of StreamPageRequest.

      cursor is the value of the last element in the previous page, or null if this is the first page.

      Specified by:
      request in interface StreamPageRequests
      Parameters:
      cursor - the value of the last element in the previous page, or null if this is the first page
      limit - maximum number of results on a page, will be set to StreamPageRequest.MAX_PAGE_LIMIT if null
      Returns:
      a page request object
    • limit

      public StreamPageRequest limit(StreamPageRequest pageRequest, int maxSize)
      Takes a page request and if its limit is greater than maxSize then returns a new page request with limit equal to maxSize. Otherwise the same page request is returned.
      Specified by:
      limit in interface StreamPageRequests
      Parameters:
      pageRequest - original page request
      maxSize - maximum limit in page request
      Returns:
      page request with limit no greater than maxSize