Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.api
Interface PagedDocumentsProvider

All Superinterfaces:
Serializable
All Known Implementing Classes:
DocumentsPageProvider, EmptyResultsProvider, SearchPageProvider

Deprecated. use PageProvider instead

@Deprecated
public interface PagedDocumentsProvider
extends Serializable

Interface that provide means to access a result set by pages, allowing easy navigation between them.

Author:
Dragos Mihalache, Georges Racinet

Field Summary
static int UNKNOWN_SIZE
          Deprecated. Constant to express that the total number of result elements is unknown.
 
Method Summary
 DocumentModelList getCurrentPage()
          Deprecated. Returns the current page of results.
 int getCurrentPageIndex()
          Deprecated. Get current page index as a 0 (zero) based int.
 int getCurrentPageOffset()
          Deprecated.  
 int getCurrentPageSize()
          Deprecated.  
 String getCurrentPageStatus()
          Deprecated.  
 String getName()
          Deprecated.  
 DocumentModelList getNextPage()
          Deprecated. Get the next page of documents.
 int getNumberOfPages()
          Deprecated. Return the total number of pages
 DocumentModelList getPage(int page)
          Deprecated. Sets the current page of results to the required one and return it.
 int getPageSize()
          Deprecated.  
 long getResultsCount()
          Deprecated.  
 SortInfo getSortInfo()
          Deprecated.  
 boolean isNextPageAvailable()
          Deprecated.  
 boolean isPreviousPageAvailable()
          Deprecated.  
 boolean isSortable()
          Deprecated.  
 void last()
          Deprecated. Go to the last page
 void next()
          Deprecated. Go to the next page
 void previous()
          Deprecated. Go to the previous page
 void refresh()
          Deprecated. Forces refresh of the current page.
 void rewind()
          Deprecated. Go to the first page
 void setName(String name)
          Deprecated.  
 

Field Detail

UNKNOWN_SIZE

static final int UNKNOWN_SIZE
Deprecated. 
Constant to express that the total number of result elements is unknown.

See Also:
Constant Field Values
Method Detail

getCurrentPage

DocumentModelList getCurrentPage()
Deprecated. 
Returns the current page of results.

This method is designed to be called from JSF. It therefore ensures cheapness of repeated calls, rather than data consistency. There is a refresh() method for that.

Returns:
the current page

getPage

DocumentModelList getPage(int page)
Deprecated. 
Sets the current page of results to the required one and return it.

Parameters:
page - the page index, starting from 0

refresh

void refresh()
Deprecated. 
Forces refresh of the current page.


isNextPageAvailable

boolean isNextPageAvailable()
Deprecated. 
Returns:
a boolean expressing if there are further pages.

isPreviousPageAvailable

boolean isPreviousPageAvailable()
Deprecated. 
Returns:
a boolean expressing if there is a previous page.

getCurrentPageSize

int getCurrentPageSize()
Deprecated. 
Returns:
the number of elements in current page.

getPageSize

int getPageSize()
Deprecated. 
Returns:
the number of requested page size.

getCurrentPageOffset

int getCurrentPageOffset()
Deprecated. 
Returns:
the offset (starting from 0) of the first element in the current page or UNKNOWN_SIZE

getNextPage

DocumentModelList getNextPage()
Deprecated. 
Get the next page of documents.

Has the side effect of setting the current page, too, hence provider.getNextPage() is equivalent to provider.next(); page = provider.getCurrentPage() in terms of returned value and state of the provider, although implementation details might imply a performance difference.

Returns:
the next page of documents

getResultsCount

long getResultsCount()
Deprecated. 
Returns:
number of result elements if available or UNKNOWN_SIZE if it is unknown

getCurrentPageIndex

int getCurrentPageIndex()
Deprecated. 
Get current page index as a 0 (zero) based int.

Returns:
current page index

getNumberOfPages

int getNumberOfPages()
Deprecated. 
Return the total number of pages

Returns:
an integer

getCurrentPageStatus

String getCurrentPageStatus()
Deprecated. 
Returns:
a simple formatted string for current pagination statuts.

rewind

void rewind()
Deprecated. 
Go to the first page


previous

void previous()
Deprecated. 
Go to the previous page


next

void next()
Deprecated. 
Go to the next page


last

void last()
Deprecated. 
Go to the last page


getSortInfo

SortInfo getSortInfo()
Deprecated. 
Returns:
the sorting info for this provider

isSortable

boolean isSortable()
Deprecated. 
Returns:
if this provider is sortable

getName

String getName()
Deprecated. 
Returns:
the provider identifier

setName

void setName(String name)
Deprecated. 
Parameters:
name - the provider identifier

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.