com.atlassian.confluence.api.impl.pagination
Interface PaginationServiceInternal

All Superinterfaces:
PaginationService
All Known Implementing Classes:
PaginationServiceImpl

public interface PaginationServiceInternal
extends PaginationService

Additional pagination functionality dealing with PagingIterators / Paginated live here Until CONFDEV-26743 is resolved and we have a blessed path going forward, the PagingIterator / Paginated types should not be leaked to consumers.


Method Summary
<F,T> Paginated<T>
createPaginated(PaginationBatch<F> fetchBatch, com.google.common.base.Function<? super F,T> modelConverter, int maxLimit)
          Constructs a Paginated implementation backed by the given PaginationBatch.
<F,T> PagingIterator<T>
createPagingIterator(PaginationBatch<F> fetchBatch, int resultsPerPage, com.google.common.base.Function<? super F,T> modelConverter)
          Constructs a PagingIterator backed by the given PaginationBatch.
 
Methods inherited from interface com.atlassian.confluence.api.service.pagination.PaginationService
doPaginationRequest
 

Method Detail

createPagingIterator

<F,T> PagingIterator<T> createPagingIterator(PaginationBatch<F> fetchBatch,
                                             int resultsPerPage,
                                             com.google.common.base.Function<? super F,T> modelConverter)
Constructs a PagingIterator backed by the given PaginationBatch. The Iterator is guaranteed to yield all results provided by the PaginationBatch. No more than resultsPerPage are fetched from the PaginationBatch at one time, and each batch of data is only kept live for the time it takes callers to iterate through it.

Parameters:
fetchBatch - - a request for a range of data
resultsPerPage - - number of results to request from PaginationBatch each invocation.
modelConverter - - a function to convert from the supplied object to a model object, this will be executed within a transaction.
Returns:
a PagingIterator of model objects, with results that the user is allowed to see.
See Also:
com.atlassian.confluence.api.model.pagination.PagingIterator

createPaginated

<F,T> Paginated<T> createPaginated(PaginationBatch<F> fetchBatch,
                                   com.google.common.base.Function<? super F,T> modelConverter,
                                   int maxLimit)
Constructs a Paginated implementation backed by the given PaginationBatch.

Parameters:
fetchBatch - - a request for a range of data
modelConverter - - a function to convert from the supplied object to a model object, this will be executed within a transaction.
maxLimit - - the max limit to apply when creating LimitedRequests for paged requests from the Paginated.
See Also:
com.atlassian.confluence.api.model.pagination.Paginated


Copyright © 2003–2015 Atlassian. All rights reserved.