public interface

PageRequest

com.atlassian.stash.util.PageRequest
Known Indirect Subclasses

Class Overview

Pagination for a request.

Summary

Public Methods
@Nonnull PageRequest buildRestrictedPageRequest(int maxLimit)
@Deprecated @Nullable String getFilter()
This method is deprecated. Deprecated in Stash 2.0 for removal in 3.0. New code added from 2.0 on will not honour filters applied to page requests. While filtering on a String is useful for some types, it is generally insufficient for more complicated entities. It is also impossible to document at this level which properties on a given entity a filter will be applied to. Methods that previously used this value have also been deprecated, and will include documentation on how to filter search results moving forward.
int getLimit()
int getStart()

Public Methods

@Nonnull public PageRequest buildRestrictedPageRequest (int maxLimit)

Parameters
maxLimit the maximum limit allowed in a page
Returns
  • a copy of this pageRequest with the minimum of limit and maxLimit

@Deprecated @Nullable public String getFilter ()

This method is deprecated.
Deprecated in Stash 2.0 for removal in 3.0. New code added from 2.0 on will not honour filters applied to page requests. While filtering on a String is useful for some types, it is generally insufficient for more complicated entities. It is also impossible to document at this level which properties on a given entity a filter will be applied to. Methods that previously used this value have also been deprecated, and will include documentation on how to filter search results moving forward.

Returns
  • the (optional) filter to apply when retrieving results

public int getLimit ()

Returns
  • the maximum allowed size of the page

public int getStart ()

Returns
  • the index of the element in the result set that this page will start at