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 |
static String |
DEFAULT_NAVIGATION_RESULTS_KEY |
static String |
DEFAULT_NAVIGATION_RESULTS_PROPERTY |
static String |
DEFAULT_NAVIGATION_RESULTS_VALUE |
static String |
MAX_RESULTS_PROPERTY |
static String |
PAGE_SIZE_RESULTS_KEY |
DEFAULT_MAX_PAGE_SIZE, DEFAULT_MAX_PAGE_SIZE_RUNTIME_PROP, PAGE_LIMIT_UNKNOWN, 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. |
long |
getMaxResults()
Returns the maximum number of results or
0 |
long |
getPageLimit()
Returns the page limit.
|
void |
refresh()
Refresh hook, to override for custom behavior
|
void |
setMaxResults(long maxResults)
Sets the maximum number of result elements.
|
addSortInfo, firstPage, getCurrentEntry, getCurrentHigherNonEmptyPageIndex, getCurrentPageIndex, getCurrentPageOffset, getCurrentPageSize, getCurrentPageStatus, getDefinition, getError, getErrorMessage, getMaxNumberOfEmptyPages, getMaxPageSize, getMinMaxPageSize, getName, getNumberOfPages, getPageSize, getParameters, getProperties, getResultsCount, getSearchDocumentModel, getSortInfo, getSortInfoIndex, getSortInfos, hasChangedParameters, hasError, isLastPageAvailable, isNextEntryAvailable, isNextPageAvailable, isPreviousEntryAvailable, isPreviousPageAvailable, isSortable, last, lastPage, next, nextEntry, nextPage, previous, previousEntry, previousPage, rewind, setCurrentEntry, setCurrentEntryIndex, setCurrentHigherNonEmptyPageIndex, setCurrentPage, setCurrentPageIndex, setCurrentPageOffset, setDefinition, setMaxPageSize, setName, setPageProviderChangedListener, setPageSize, setParameters, setProperties, setResultsCount, setSearchDocumentModel, setSelectedEntries, setSortable, setSortInfo, setSortInfo, setSortInfos
public static final String CORE_SESSION_PROPERTY
public static final String MAX_RESULTS_PROPERTY
public static final String DEFAULT_NAVIGATION_RESULTS_KEY
public static final String PAGE_SIZE_RESULTS_KEY
public static final String DEFAULT_NAVIGATION_RESULTS_PROPERTY
public static final String DEFAULT_NAVIGATION_RESULTS_VALUE
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 long getMaxResults()
0 if there is no limit.
public long getPageLimit()
getPageLimit
in interface PageProvider<DocumentModel>
getPageLimit
in class AbstractPageProvider<DocumentModel>
public void setMaxResults(long maxResults)
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()
AbstractPageProvider
When overriding it, call super.refresh()
as last statement
to make sure that the PageProviderChangedListener
is called with
the up-to-date @{code PageProvider} state.
refresh
in interface PageProvider<DocumentModel>
refresh
in class AbstractPageProvider<DocumentModel>
Copyright © 2013 Nuxeo SA. All Rights Reserved.