public abstract class PaginableAdapter<T> extends DefaultAdapter
In order to use it, just override the getPageProviderDefinition()
and
getParams()
Modifier and Type | Field and Description |
---|---|
protected Long |
currentPageIndex |
protected String |
maxResults |
protected Long |
pageSize |
protected String |
sortBy
Sort by parameters (can be a list of sorts, separated by commas).
|
protected String |
sortOrder
Sort order parameters (can be a list of sorts orders, separated by commas, matched by index to corresponding sort
by parameters).
|
Constructor and Description |
---|
PaginableAdapter() |
Modifier and Type | Method and Description |
---|---|
protected Long |
extractLongParam(javax.servlet.http.HttpServletRequest request,
String paramName,
Long defaultValue) |
<A> A |
getAdapter(Class<A> adapter)
Returns an object which is an instance of the given class associated with this object.
|
protected abstract PageProviderDefinition |
getPageProviderDefinition() |
Paginable<T> |
getPaginableEntries() |
protected Paginable<T> |
getPaginableEntries(PageProvider<T> pageProvider) |
protected Object[] |
getParams() |
protected DocumentModel |
getSearchDocument() |
protected void |
initialize(Object... args) |
disptachAdapter, getTarget, isAdapter
checkGuard, dispose, getActiveAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
checkGuard, dispose, getActiveAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot
protected Long currentPageIndex
protected String maxResults
protected String sortBy
Exp: dc:title,dc:modified.
public PaginableAdapter()
protected void initialize(Object... args)
initialize
in class AbstractResource<ResourceTypeImpl>
public <A> A getAdapter(Class<A> adapter)
Adaptable
null
if no such object can be found.getAdapter
in interface Adaptable
getAdapter
in class AbstractResource<ResourceTypeImpl>
adapter
- the adapter class to look upnull
if this object does not have an adapter for
the given classprotected abstract PageProviderDefinition getPageProviderDefinition()
protected DocumentModel getSearchDocument()
public Paginable<T> getPaginableEntries()
protected Paginable<T> getPaginableEntries(PageProvider<T> pageProvider)
protected Long extractLongParam(javax.servlet.http.HttpServletRequest request, String paramName, Long defaultValue)
Copyright © 2017 Nuxeo. All rights reserved.