Class ContinuationTokenPagination

All Implemented Interfaces:
Describable<Pagination>, Serializable

public class ContinuationTokenPagination extends Pagination
Reads a continuation token from the Json body and requests the configured endpoint again with the token as a query parameter, as Nexus 3 (continuationToken) or offset based APIs (nextPageStart) do.
See Also:
  • Constructor Details

    • ContinuationTokenPagination

      @DataBoundConstructor public ContinuationTokenPagination(String tokenExpression, String queryParameter)
  • Method Details

    • getTokenExpression

      public String getTokenExpression()
    • getQueryParameter

      public String getQueryParameter()
    • next

      Description copied from class: Pagination
      Finds the next page to request after page.
      Specified by:
      next in class Pagination
      Parameters:
      page - The page just fetched
      Returns:
      The next page, or empty when page is the last one
    • incompatibilityWith

      public Optional<String> incompatibilityWith(MimeType mimeType)
      Description copied from class: Pagination
      The error that makes this strategy unusable with mimeType at fetch time, if any. Configuration mistakes that can still be fetched (such as an out-of-range page limit) are not errors here.
      Overrides:
      incompatibilityWith in class Pagination
    • validate

      public FormValidation validate(MimeType mimeType)
      Description copied from class: Pagination
      Runs the same checks as the configuration form's field checks, for settings that were never saved.
      Overrides:
      validate in class Pagination
      Parameters:
      mimeType - The parameter's MIME type
      Returns:
      The first failing check, or FormValidation.ok()