Class RestPageRequest

java.lang.Object
com.atlassian.confluence.rest.v2.api.model.RestPageRequest
All Implemented Interfaces:
PageRequest

@ExperimentalApi public class RestPageRequest extends Object implements PageRequest
A request for a page of data. It is a page request that also wraps the URI of the original request, this allows navigational URIs to be built for the next and previous pages.
Since:
9.0
  • Field Details

  • Constructor Details

    • RestPageRequest

      @Deprecated public RestPageRequest(javax.ws.rs.core.UriInfo requestInfo, int start, int limit)
      Deprecated.
      Parameters:
      requestInfo - request UriInfo to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      start - zero-based start index for the page of results (first result is 0)
      limit - the number of the results to return in the page
    • RestPageRequest

      @Deprecated public RestPageRequest(javax.ws.rs.core.UriInfo requestInfo, Cursor cursor, int limit)
      Deprecated.
      Parameters:
      requestInfo - request UriInfo to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      cursor - the identifier which is used to skip results from a previous query when paginating
      limit - the number of the results to return in the page
      Since:
      9.0
    • RestPageRequest

      @Deprecated public RestPageRequest(Navigation.Builder navBuilder, int start, int limit)
      Parameters:
      navBuilder - a Navigation.Builder to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      start - zero-based start index for the page of results (first result is 0)
      limit - the number of the results to return in the page
    • RestPageRequest

      @Deprecated public RestPageRequest(Navigation.Builder navBuilder, Cursor cursor, int limit)
      Parameters:
      navBuilder - a Navigation.Builder to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      cursor - the identifier which is used to skip results from a previous query when paginating
      limit - the number of the results to return in the page
      Since:
      9.0
    • RestPageRequest

      @Deprecated public RestPageRequest(javax.ws.rs.core.UriBuilder requestUri, int start, int limit)
      Deprecated.
      Parameters:
      requestUri - a uriBuilder to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      start - zero-based start index for the page of results (first result is 0)
      limit - the number of the results to return in the page
    • RestPageRequest

      public RestPageRequest(URI requestUri, int start, int limit)
      Parameters:
      requestUri - a URI to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      start - zero-based start index for the page of results (first result is 0)
      limit - the number of the results to return in the page
      Since:
      9.4
    • RestPageRequest

      @Deprecated public RestPageRequest(javax.ws.rs.core.UriBuilder requestUri, Cursor cursor, int limit)
      Deprecated.
      Parameters:
      requestUri - a uriBuilder to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      cursor - the identifier which is used to skip results from a previous query when paginating
      limit - the number of the results to return in the page
      Since:
      9.0
    • RestPageRequest

      public RestPageRequest(URI requestUri, Cursor cursor, int limit)
      Parameters:
      requestUri - a URI to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      cursor - the identifier which is used to skip results from a previous query when paginating
      limit - the number of the results to return in the page
      Since:
      9.4
    • RestPageRequest

      @Deprecated protected RestPageRequest(javax.ws.rs.core.UriBuilder requestUri, int start, Cursor cursor, int limit)
      Deprecated.
      Parameters:
      requestUri - a uriBuilder to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      start - zero-based start index for the page of results (first result is 0). This value shouldn't be used when cursor is not null.
      cursor - the identifier which is used to skip results from a previous query when paginating. This value shouldn't be used when start > 0. This value must be greater than or equal to 0.
      limit - the number of the results to return in the page. This value must be greater than or equal to 0.
      Throws:
      BadRequestException - when start is greater than 0 and cursor is not null, or when either limit or start are less than 0.
    • RestPageRequest

      protected RestPageRequest(URI requestUri, int start, Cursor cursor, int limit)
      Parameters:
      requestUri - a URI to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      start - zero-based start index for the page of results (first result is 0). This value shouldn't be used when cursor is not null.
      cursor - the identifier which is used to skip results from a previous query when paginating. This value shouldn't be used when start > 0. This value must be greater than or equal to 0.
      limit - the number of the results to return in the page. This value must be greater than or equal to 0.
      Throws:
      BadRequestException - when start is greater than 0 and cursor is not null, or when either limit or start are less than 0.
      Since:
      9.4
    • RestPageRequest

      @Deprecated public RestPageRequest(Navigation.Builder navBuilder, PageResponse<Content> response)
      Deprecated.
      Parameters:
      navBuilder - a Navigation.Builder to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      response - a response whose PageRequest supplies the start and limit fields
    • RestPageRequest

      public RestPageRequest(URI requestUri, PageRequest original)
      Parameters:
      requestUri - a URI to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      original - a request which supplies the start and limit fields
      Since:
      9.4
    • RestPageRequest

      @Deprecated public RestPageRequest(javax.ws.rs.core.UriBuilder requestUri, PageResponse<?> original)
      Deprecated.
      Parameters:
      requestUri - a uriBuilder to be used to produce the self, next and previous links to the resource handling this RestPageRequest
      original - a request which supplies the start and limit fields
  • Method Details

    • copyWithLimits

      public RestPageRequest copyWithLimits(PageResponse<?> response)
    • getStart

      public int getStart()
      Specified by:
      getStart in interface PageRequest
      Returns:
      zero-based start index for the page of results (first result is 0)
    • getLimit

      public int getLimit()
      Specified by:
      getLimit in interface PageRequest
      Returns:
      the number of the results to return in the page
    • getCursor

      public Cursor getCursor()
      Specified by:
      getCursor in interface PageRequest
      Returns:
      the identifier which is used to skip results from a previous query when paginating
    • getRequestUri

      public URI getRequestUri()
      Since:
      9.4
    • getUriBuilder

      @Deprecated public javax.ws.rs.core.UriBuilder getUriBuilder()
      Deprecated.
      since 9.4 use getRequestUri()