public class CoreQueryDocumentPageProvider extends AbstractPageProvider<DocumentModel>
It builds the query at each call so that it can refresh itself when the query changes.
TODO: describe needed properties
Modifier and Type | Field and Description |
---|---|
static String |
CHECK_QUERY_CACHE_PROPERTY |
static String |
CORE_SESSION_PROPERTY |
DEFAULT_MAX_PAGE_SIZE, UNKNOWN_SIZE, UNKNOWN_SIZE_AFTER_QUERY
Constructor and Description |
---|
CoreQueryDocumentPageProvider() |
Modifier and Type | Method and Description |
---|---|
List<DocumentModel> |
getCurrentPage()
Returns the current page of results.
|
String |
getCurrentQuery() |
PageSelections<DocumentModel> |
getCurrentSelectPage()
Returns the current page of results wrapped in a
PageSelection
item. |
void |
refresh()
Forces refresh of the current page.
|
addSortInfo, firstPage, getCurrentEntry, getCurrentHigherNonEmptyPageIndex, getCurrentPageIndex, getCurrentPageOffset, getCurrentPageSize, getCurrentPageStatus, getDefinition, getError, getErrorMessage, getMaxNumberOfEmptyPages, getMaxPageSize, getMinMaxPageSize, getName, getNumberOfPages, getPageSize, getParameters, getProperties, getResultsCount, getSearchDocumentModel, getSortInfo, getSortInfoIndex, getSortInfos, hasError, isLastPageAvailable, isNextEntryAvailable, isNextPageAvailable, isPreviousEntryAvailable, isPreviousPageAvailable, isSortable, last, lastPage, next, nextEntry, nextPage, previous, previousEntry, previousPage, rewind, setCurrentEntry, setCurrentEntryIndex, setCurrentHigherNonEmptyPageIndex, setCurrentPage, setCurrentPageOffset, setDefinition, setMaxPageSize, setName, setPageSize, setParameters, setProperties, setResultsCount, setSearchDocumentModel, setSelectedEntries, setSortable, setSortInfo, setSortInfo, setSortInfos
public static final String CORE_SESSION_PROPERTY
public static final String CHECK_QUERY_CACHE_PROPERTY
public List<DocumentModel> getCurrentPage()
PageProvider
This method is designed to be called from higher levels. It therefore ensures cheapness of repeated calls, rather than data consistency. There is a refresh() method for that.
getCurrentPage
in interface PageProvider<DocumentModel>
getCurrentPage
in class AbstractPageProvider<DocumentModel>
public PageSelections<DocumentModel> getCurrentSelectPage()
PageProvider
PageSelection
item.
By default, no entry is selected, unless
PageProvider.setSelectedEntries(List)
has been called before.
getCurrentSelectPage
in interface PageProvider<DocumentModel>
getCurrentSelectPage
in class AbstractPageProvider<DocumentModel>
public String getCurrentQuery()
public void refresh()
PageProvider
refresh
in interface PageProvider<DocumentModel>
refresh
in class AbstractPageProvider<DocumentModel>
Copyright © 2011 Nuxeo SA. All Rights Reserved.